Re: [gdal-dev] generating multipolygon from polygons

2012-08-02 Thread Frank Warmerdam
Neojp, Try AddGeometry with a capital A. Best regards, Frank On Aug 2, 2012 2:33 PM, "neojp" wrote: > Dear List, > > I need to generate a multipolygon by adding all the polygons in a > shapefile. > Based on a previous post I plan to use the addgeometry() to pass each > feature to the multipolyg

Re: [gdal-dev] Error in OSGeo.GDAL.Gdal.Open for .tif format

2012-08-02 Thread Frank Warmerdam
Zhenyu Lu, Gdal.Open() with GA_Update mode cannot be used to create new files. Instead you will need to use the Create method on the driver object, and specify the size, band count and other creation options. GA_Update in Gdal.Open() is intended for use with existing files that you want to updat

[gdal-dev] generating multipolygon from polygons

2012-08-02 Thread neojp
Dear List, I need to generate a multipolygon by adding all the polygons in a shapefile. Based on a previous post I plan to use the addgeometry() to pass each feature to the multipolygon layer. I have implemented this in python but I cannot figure out what is going wrong. Python says "'Geometry' o

Re: [gdal-dev] Corrupted .shp error when reading shapefile from multiple threads

2012-08-02 Thread Martin Chapman
Even, Thank you for your input on that. I figured that was a risky idea and it is good to know the definitive answer. Best regards, Martin -Original Message- From: Even Rouault [mailto:even.roua...@mines-paris.org] Sent: Thursday, August 02, 2012 2:13 AM To: Martin Chapman Cc: 'kedarde

Re: [gdal-dev] reprojection of global rasters to mollweide

2012-08-02 Thread Michael Schulz
Dear Even, thanks for your response, finally I got it working. The main issue was that the global dataset had an extent e.g. on the most western border of -180.0044643 which caused the error (although strangely not always, because I tried the same command with the same dataset and sometime it work

Re: [gdal-dev] 'Polygons as multipolygons' option for OSM driver

2012-08-02 Thread Rahkonen Jukka
Hi, Your plan is very reasonable. It should give correct results in most cases and I think that total solution is not possible before OSM project is able to develop 'the simplest approach that could possibly generate useful polygons' (adapted from http://wiki.openstreetmap.org/wiki/FAQ#Why_are

Re: [gdal-dev] 'Polygons as multipolygons' option for OSM driver

2012-08-02 Thread Even Rouault
Selon Jukka Rahkonen : > In OSM data same sort of polygon features are typically modelled either as > closed rings or as multipolygon relations if they happen to have holes or if > the > length of the outer ring exceeds the limit of 2000 nodes. > > For making rendering more simple the OGR driver m

Re: [gdal-dev] Corrupted .shp error when reading shapefile from multiple threads

2012-08-02 Thread Even Rouault
Selon Martin Chapman : > Kedar, > > Think about it...how does GetNextFeature() know what feature is next? > It's because somewhere inside the datasource handle there is probably a > variable that is keeping track of what record is next. If multiple > threads are all using the same datasource hand