RE: [gdal-dev] netCDF to Shapefile

2011-03-16 Thread Manuel Rainer
thank you guys, a lot of useful information! finally, I'm tryin' what works best in my case. cheers manuel Date: Wed, 16 Mar 2011 12:05:18 +0100 Subject: Re: [gdal-dev] netCDF to Shapefile From: andrea...@gmail.com To: pco...@gmail.com CC: manuelrai...@hotmail.com; gdal-dev@lists.osgeo.org

Re: [gdal-dev] Calculate footprints of shapefiles

2011-03-16 Thread Chaitanya kumar CH
Armin, Cascaded Union works pretty much like Union except that it is optimized to work on more than two geometries. Both OGR and PostGIS uses the GEOS library to perform this. Read this blog entry by Paul Ramsey: http://blog.cleverelephant.ca/2009/01/must-faster-unions-in-postgis-14.html On Wed,

Re: Re: [gdal-dev] Where is this nmake.opt file located?

2011-03-16 Thread Chaitanya kumar CH
Natasha, After you install the GDAL and GDAL-Oracle packages, you can access the command line applications in the OSGeo4W Shell command window. http://trac.osgeo.org/osgeo4w/#QuickStartforOSGeo4WUsers You can find the info on connecting to Oracle Spatial in the GDAL website. For vector data acces

Re: [gdal-dev] Calculate footprints of shapefiles

2011-03-16 Thread Christopher Barker
thanks for the hints. So a sort of Union operation seems to be necessary. I need to check how fast that is with OGR on larger shapefiles (I want to store in PostGIS just the footprint, not the full geometry collection). The Convex Hull could be a good alternative to a simplified boundary. i

Re: [gdal-dev] Reproject Globcover

2011-03-16 Thread Brian Claywell
On Wed, Mar 16, 2011 at 5:12 PM, Monica Buescu wrote: > I pretend to reproject a known JRC product called GLOBCOVER to UTM WGS84 > (zone for France) using gdalwarp keeping spatial resolution (300m) and > null_values. Can anyone give me a suggestion on how to reproject it using > gdal? Try: gdalw

[gdal-dev] Reproject Globcover

2011-03-16 Thread Monica Buescu
Greetings I pretend to reproject a known JRC product called GLOBCOVER to UTM WGS84 (zone for France) using gdalwarp keeping spatial resolution (300m) and null_values. Can anyone give me a suggestion on how to reproject it using gdal? Bellow is the gdalinfo information Driver: GTiff/GeoTIFF Files:

Re: [gdal-dev] Get pixel values from all bands

2011-03-16 Thread Eli Adam
Alexander, Not sure if it meets you situation, but there is a command line utility with similar functionality, gdallocationinfo, http://gdal.org/gdallocationinfo.html HTH, Eli >>> On 3/16/2011 at 1:21 PM, in message <20110316222128.b943f4e3.alexander.b...@gmail.com>, Alexander Bruy wrot

Re: [gdal-dev] Get pixel values from all bands

2011-03-16 Thread Mateusz Loskot
Alexander Bruy wrote: > > Here is simplified code > > // iterate over image row by row > for ( int row = 0; row < ySize; ++row ) > { > // read one row from each band and store it in list > for ( int b = 0; b < bandCount; ++b ) > { > float *scanline; > scanline = (float *) CPLMalloc( s

[gdal-dev] Get pixel values from all bands

2011-03-16 Thread Alexander Bruy
Hi all I work on raster processing application (developed with C++ and Qt). For reading rasters we use GDAL and it's C++ API. For one task we need to get pixel values from all raster bands. For this I get all GDALRasterBands and store them in list. Then in loop read image row by row and store row

[gdal-dev] gdal_translate format listing is too long

2011-03-16 Thread Jamie Adams
Hello all, Question - is there some reason why gdal_translate needs to show a format listing when invoked on the command line with no arguments? On my system this outputs 61 lines which is nearly a maximized shell on my 24" monitor. Wouldn't requiring the --formats flag be more consistent with o

Re: [gdal-dev] Need help generating output with alpha channels using Python API

2011-03-16 Thread Frank Warmerdam
On 11-03-14 12:50 PM, Michal Migurski wrote: Hello, I'm having some difficulties understanding how to get GDAL to generate images with usable alpha channels. I have 3-channel RGB input JPEG image, delivered to GDAL as a VRT with a projection and ground control points, which I'm warping to an out

[gdal-dev] Pickling OGR Geometry

2011-03-16 Thread Jason Beverage
Hi all, I'm looking at pickling ogr geometry. I took the following code from the gdal autotests to try it out: geom_wkt = 'MULTIPOLYGON( ((0 0,1 1,1 0,0 0)),((0 0,10 0, 10 10, 0 10),(1 1,1 2,2 2,2 1)) )' geom = ogr.CreateGeometryFromWkt(geom_wkt) p = pickle.dumps(geom) g = pickle.loads(p) if not

Re: [gdal-dev] netCDF to Shapefile

2011-03-16 Thread Andreas Forø Tollefsen
I have done this but not to a shapefile direct, but into a postgis database. Use for loops to loop through the temporal dimension, then the lon and lat as sub loops. Then you create an insert string to input each line of data into the sql database. In our NetCDF we have 720x360 observations spatial

Re: [gdal-dev] Calculate footprints of shapefiles

2011-03-16 Thread Armin Burger
Chaitanya thanks for the hints. So a sort of Union operation seems to be necessary. I need to check how fast that is with OGR on larger shapefiles (I want to store in PostGIS just the footprint, not the full geometry collection). The ConvexHull could be a good alternative to a simplified bounda

Re: [gdal-dev] netCDF to Shapefile

2011-03-16 Thread Paolo Corti
On Wed, Mar 16, 2011 at 3:51 AM, Manuel Rainer wrote: > Hi, > > I would like to convert certain time slices (records) out of a netCDF file > to a Shapefile. > The netCDF file has 7> GB, so what is the best proceed to get an appropriate > performance? > I mean, should the data be cached (e.g. in an

RE: [gdal-dev] netCDF to Shapefile

2011-03-16 Thread Manuel Rainer
Ok, here are more details: I am using Python (2.6) together with netCDF4, numpy and gdal/ogr. So far, I am able to read the dimensions, attributes and variables. I have to choose records depending on certain time slices and export these records together with their dimensions into a shapefile.