Re: [gdal-dev] gdal_retile error

2011-03-08 Thread christian . mueller
Perhaps a problem with the file permissions ? After creating the tiles for level 0, the utility wants to create a subdir called 1 and store the tiles for level 1 in this subdir. Check this with your user. Make mkdir 1 cd 1 touch test.tif rm test.tif Quoting Vasile Craciunescu

[gdal-dev] Polygon topology

2011-03-08 Thread Simon Lyngby Kokkendorff
Hi List, I am using ogr via the python bindings to construct various polygons. Here's just a simple question, to which someone might have some input. Is there anyway to determine the topology, i.e. the number of holes, of a polygon without e.g. having to export to WKT and examining the output

Re: [gdal-dev] Polygon topology

2011-03-08 Thread Chaitanya kumar CH
Simon, You can use the OGRPolygon::getNumInteriorRings() method to get the number of holes in an OGR polygon object. On Tue, Mar 8, 2011 at 2:27 PM, Simon Lyngby Kokkendorff sil...@gmail.comwrote: Hi List, I am using ogr via the python bindings to construct various polygons. Here's just a

Re: [gdal-dev] Polygon topology

2011-03-08 Thread Mike Toews
You could use the `interiors` length in Shapely: from osgeo import ogr from shapely.wkb import loads source = ogr.Open('my_polygons.shp') layer = source.GetLayer() feature = layer.GetNextFeature() num = 0 while feature: g = loads(feature.GetGeometryRef().ExportToWkb()) if g.geom_type ==

Re: [gdal-dev] Polygon topology

2011-03-08 Thread Even Rouault
Selon Chaitanya kumar CH chaitanya...@gmail.com: I'm sorry. I now see that this method is not exposed in the python bindings. Not exactly. In fact you have to use the Geometry.GetGeometryCount() that returns 1 (the exterior ring) + the number of interior rings. So polygon.GetGeometryCount() - 1

Re: [gdal-dev] gdal_retile error

2011-03-08 Thread Vasile Craciunescu
Christian, The permissions are OK. 1-8 subdirs are created as soon as the command is launched. The program stops after generating 10-15% of the level0 tiles. -Vasile On 3/8/11 10:13 AM, christian.muel...@nvoe.at wrote: Perhaps a problem with the file permissions ? After creating the tiles

Re: [gdal-dev] Polygon topology

2011-03-08 Thread Mike Toews
On 8 March 2011 23:22, Even Rouault even.roua...@mines-paris.org wrote: Not exactly. In fact you have to use the Geometry.GetGeometryCount() that returns 1 (the exterior ring) + the number of interior rings. So polygon.GetGeometryCount() - 1 should return the number of interior rings I

Re: [gdal-dev] Polygon topology

2011-03-08 Thread Even Rouault
Selon Mike Toews mwto...@gmail.com: On 8 March 2011 23:22, Even Rouault even.roua...@mines-paris.org wrote: Not exactly. In fact you have to use the Geometry.GetGeometryCount() that returns 1 (the exterior ring) + the number of interior rings. So polygon.GetGeometryCount() - 1 should

Re: [gdal-dev] Polygon topology

2011-03-08 Thread Simon Lyngby Kokkendorff
Thanks a lot. Didn't know that GetGeometryCount did that on polygons :-) Cheers, Simon On Tue, Mar 8, 2011 at 11:51 AM, Even Rouault even.roua...@mines-paris.orgwrote: Selon Mike Toews mwto...@gmail.com: On 8 March 2011 23:22, Even Rouault even.roua...@mines-paris.org wrote: Not

Re: [gdal-dev] gdal_retile error

2011-03-08 Thread christian . mueller
Perhaps there is a resource limit for the number of the files in a directory. Try using -useDirForEachRow This builds another directory hierarchy with less files per directory. Quoting Vasile Craciunescu vasile.craciune...@gmail.com: Christian, The permissions are OK. 1-8 subdirs are

[gdal-dev] Is it possible to test if GDAL has been built with GEOS in a python script

2011-03-08 Thread Dan Putler
Hi all, As the message heading indicates, I am hoping to run a check within a python script to determine if GDAL on a machine has been built with GEOS support, and exit if it hasn't. Looking at inspect.getmembers( gdal ) suggests that I'm out of luck, but I wanted to confirm this. Dan

Re: [gdal-dev] Is it possible to test if GDAL has been built with GEOS in a python script

2011-03-08 Thread Even Rouault
Le mardi 08 mars 2011 22:03:41, Dan Putler a écrit : Hi all, As the message heading indicates, I am hoping to run a check within a python script to determine if GDAL on a machine has been built with GEOS support, and exit if it hasn't. Looking at inspect.getmembers( gdal ) suggests that I'm

Re: [gdal-dev] gdal_retile error

2011-03-08 Thread Vasile Craciunescu
Solved (I hope). Something I fail to mention in the first place: the drive where the tiles are processed is mounted through sshfs (physically the disk is incorporated in another server). After moving the data on a local drive, gdal_retile.py passed, without error, the 4151 tile limit.

[gdal-dev] Fail to build with OpenJpeg

2011-03-08 Thread Joaquim Luis
Hi, My attempt to build gdal (trunk) on Windows with OpenJpeg failed with these errors C:\programs\GDALtrunk\gdal\frmtscd openjpeg nmake /nologo /f makefile.vc cd .. || exit 1 cl /nologo /MD /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG /W4 /wd4127

Re: [gdal-dev] Fail to build with OpenJpeg

2011-03-08 Thread Angelos Tzotsos
Hi Joaquim, In order to build with OpenJpeg, you must use the unreleased version 2.0 of OpenJpeg. Try the following: http://code.google.com/p/openjpeg/downloads/detail?name=openjpeg_v2_alpha_0.zip Regards, Angelos On 03/09/2011 03:23 AM, Joaquim Luis wrote: Hi, My attempt to build gdal