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 (tru

[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\frmts>cd 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 /wd41

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. Currently

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 tha

[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] 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 : Christian, The permissions are OK. 1-8 subdirs are created as soon as the command i

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 wrote: > Selon Mike Toews : > > > On 8 March 2011 23:22, Even Rouault > wrote: > > > Not exactly. In fact you have to use the Geometry.GetGeometryCount() > that

Re: [gdal-dev] Polygon topology

2011-03-08 Thread Even Rouault
Selon Mike Toews : > On 8 March 2011 23:22, Even Rouault 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 in

Re: [gdal-dev] Polygon topology

2011-03-08 Thread Mike Toews
On 8 March 2011 23:22, Even Rouault 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 initially thought so too, except

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 fo

Re: [gdal-dev] Polygon topology

2011-03-08 Thread Even Rouault
Selon Chaitanya kumar CH : > 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 should return the num

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 == 'P

Re: [gdal-dev] Polygon topology

2011-03-08 Thread Chaitanya kumar CH
I'm sorry. I now see that this method is not exposed in the python bindings. On Tue, Mar 8, 2011 at 2:59 PM, Chaitanya kumar CH wrote: > 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, S

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 wrote: > Hi List, > > I am using ogr via the python bindings to construct various polygons. > Here's just a simple quest

[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 st

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 : Dear al