[gdal-dev] LibKML driver always returns geometry (any) instead of the precise geometry type

2022-09-26 Thread G. Allegri
I'm using ogr2ogr to import KML/KMZ files with GDAL 3.2.2 on Debian 11, which is built with the LibKML driver. >From our tests we see that this driver always reports KML folders as GeometryCollection layers, even though they only contain a single geometry type On the other hand the KML driver is

Re: [gdal-dev] gdal_contour attribute field not populated for polygons outputs

2019-10-15 Thread G. Allegri
Thanks a lor Even, I missed that line ;) Works perfectly with -amin / -amax Giovanni Il giorno mar 15 ott 2019 alle ore 13:02 Even Rouault < even.roua...@spatialys.com> ha scritto: > On mardi 15 octobre 2019 12:57:16 CEST G. Allegri wrote: > > Dear list, > > I'm using gdal_

[gdal-dev] gdal_contour attribute field not populated for polygons outputs

2019-10-15 Thread G. Allegri
Dear list, I'm using gdal_contour with a single band (float) raster. It works as expected for the default linestring outputs but when I set the "-p" option the attribute field is created but it's empty. This is the command I run: >gdal_contour -b 1 -a val -i 10.0 -p -f "ESRI Shapefile" .tif .shp

Re: [gdal-dev] UFO format / GDAL 3.0

2015-04-01 Thread G. Allegri
Even, you forgot to say that this driver will be available only one day a year! :D giovanni -- Giovanni Allegri http://about.me/giovanniallegri Gis3W - http://gis3w.it Ikare - http://ikare.it Twitter: https://twitter.com/_giohappy_ blog: http://blog.spaziogis.it GEO+ geomatica in Italia

Re: [gdal-dev] how can a Geotiff occupy three times the disk space of an ASCII Grid?

2014-07-08 Thread G. Allegri
I've extracted a subset from the original ASCII: https://dl.dropboxusercontent.com/u/13861666/FI_clipped.asc I'm obtaining the same behaviour, so it can be a test case. giovanni 2014-07-05 21:43 GMT+02:00 G. Allegri gioha...@gmail.com: ldd tells me that both QGIS and gdalinfo point

[gdal-dev] how can a Geotiff occupy three times the disk space of an ASCII Grid?

2014-07-05 Thread G. Allegri
I've converted a Float32 ASCII Grid of 8861 x 9457 cells to Geotiff (with deflate compression, predicor=1). The original file was 577 MB, the resulting Geotiff is about 1.897 MB. Here is gdalinfo run on the ASCII: Driver: AAIGrid/Arc/Info ASCII Grid Files: DTM\dtm.asc DTM\dtm.asc.aux.xml

Re: [gdal-dev] how can a Geotiff occupy three times the disk space of an ASCII Grid?

2014-07-05 Thread G. Allegri
-07-05 16:02 GMT+02:00 G. Allegri gioha...@gmail.com: I've converted a Float32 ASCII Grid of 8861 x 9457 cells to Geotiff (with deflate compression, predicor=1). The original file was 577 MB, the resulting Geotiff is about 1.897 MB. Here is gdalinfo run on the ASCII: Driver: AAIGrid/Arc/Info

Re: [gdal-dev] how can a Geotiff occupy three times the disk space of an ASCII Grid?

2014-07-05 Thread G. Allegri
provider not doing the best at this level? Don't know, but this discussion is for the QGIS ml ;) giovanni On 7/5/2014 9:09 AM, G. Allegri wrote: I agree with you David, I'm surprised too. Anyway, gdal_translate is run without compression options. I've written to the QGIS devs

Re: [gdal-dev] how can a Geotiff occupy three times the disk space of an ASCII Grid?

2014-07-05 Thread G. Allegri
The problem was simpler then it appeared: I didn't realize that QGIS output is Float64. Yet I don't know why QGIS chosed to use this data type... giovanni 2014-07-05 17:56 GMT+02:00 Even Rouault even.roua...@mines-paris.org: Le samedi 05 juillet 2014 17:25:48, G. Allegri a écrit : QGIS

Re: [gdal-dev] how can a Geotiff occupy three times the disk space of an ASCII Grid?

2014-07-05 Thread G. Allegri
Finally I've reached the point: GDAL's driver is opening the ASCII as Float64, consequently QGIS treats it this way. I wonder why gdalinfo and gdal_translate treat it as Float32 instead giovanni 2014-07-05 18:53 GMT+02:00 G. Allegri gioha...@gmail.com: The problem was simpler

Re: [gdal-dev] how can a Geotiff occupy three times the disk space of an ASCII Grid?

2014-07-05 Thread G. Allegri
it. giovanni 2014-07-05 20:22 GMT+02:00 Even Rouault even.roua...@mines-paris.org: Le samedi 05 juillet 2014 20:18:50, G. Allegri a écrit : Finally I've reached the point: GDAL's driver is opening the ASCII as Float64, consequently QGIS treats it this way. I wonder why gdalinfo

Re: [gdal-dev] how can a Geotiff occupy three times the disk space of an ASCII Grid?

2014-07-05 Thread G. Allegri
Given that an ASCII Grid doesn't provide a data type, maybe the driver choose the larger one, while the utilities guess it trying to fit the values into a smaller type? giovanni 2014-07-05 20:31 GMT+02:00 G. Allegri gioha...@gmail.com: I've debugged it, and it gets Float64 directly from

Re: [gdal-dev] how can a Geotiff occupy three times the disk space of an ASCII Grid?

2014-07-05 Thread G. Allegri
, G. Allegri a écrit : Given that an ASCII Grid doesn't provide a data type, maybe the driver choose the larger one, while the utilities guess it trying to fit the values into a smaller type? No, GDAL does not do that sort of magic. Are you sure the GDAL version used by Python is the same

Re: [gdal-dev] ogr2ogr with OSM data error Too many tags in relation

2014-05-16 Thread G. Allegri
...@mines-paris.org: Le jeudi 15 mai 2014 16:29:52, G. Allegri a écrit : I'm trying to use the OGR OSM driver to convert an .osm file to sqlite (spatialite) Running: ogr2ogr -f SQlite myosm.sqlite myosm.osm -dsco SPATIALITE=YES I obtain: ERROR 1: Too many tags in relation 365331 ERROR

Re: [gdal-dev] ogr2ogr with OSM data error Too many tags in relation

2014-05-16 Thread G. Allegri
Solved the mistery :) Osgeo4W's GDAL seems to not have splite, so the output SQLite db wasn't a spatialite db. giovanni 2014-05-16 10:12 GMT+02:00 G. Allegri gioha...@gmail.com: Hi Even, thanks. A new run ended with the mentioned errors and a warning about a bad polygon. I thought

[gdal-dev] Python and OGR: layer's GetGeomType and geometry's GetGeometryType return -2147483645

2013-06-05 Thread G. Allegri
It's a long time I do not use the OGR Python APIs, but I remember I could test layer's GetGeomType and geometry's GetGeometryType against the integere corresponding to the OGRwkbGeometryType enumeration [1]. Using Python-OGR from the latest Osgeo4W (Python 2.7.4 and GDAL 1.9.2) I alwasy obtain

Re: [gdal-dev] Python and OGR: layer's GetGeomType and geometry's GetGeometryType return -2147483645

2013-06-05 Thread G. Allegri
Ahhh, I see, the wkb25DBit. Thanks Even! Giovanni 2013/6/5 Even Rouault even.roua...@mines-paris.org Le mercredi 05 juin 2013 12:13:41, G. Allegri a écrit : It's a long time I do not use the OGR Python APIs, but I remember I could test layer's GetGeomType and geometry's GetGeometryType

Re: [gdal-dev] gdal2tiles

2012-06-10 Thread G. Allegri
Hi Petr, AFAICS Maptiler is not open source, right? giovanni ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] troubles with OVERRIDE_PROJ_DATUM_WITH_TOWGS84

2012-05-22 Thread G. Allegri
Your issue with EPSG:3003 is of a different kind, and related to another change where the new logic now peaks up the EPSG preferred transformation whereas it didn't before Hi Even, I have some difficults to follow the overall flow controlling the peaking of the preferred transformation. What

Re: [gdal-dev] troubles with OVERRIDE_PROJ_DATUM_WITH_TOWGS84

2012-05-22 Thread G. Allegri
a default transformation. In general I think that transformation parameters shouldn't be provided as part of a CRS definition, but I suppose I'm not part of the majority of the users :) giovanni 2012/5/22 Frank Warmerdam warmer...@pobox.com: On Tue, May 22, 2012 at 1:47 PM, G. Allegri gioha

Re: [gdal-dev] troubles with OVERRIDE_PROJ_DATUM_WITH_TOWGS84

2012-05-22 Thread G. Allegri
the opportunity to add a datum_shift_pref.csv row. The idea of a DATUMSHIT selector would be nice ;) giovanni 2012/5/22 Frank Warmerdam warmer...@pobox.com: On Tue, May 22, 2012 at 2:25 PM, G. Allegri gioha...@gmail.com wrote: Thanks Frank for the clear explanation. I've missed your blog post

Re: [gdal-dev] troubles with OVERRIDE_PROJ_DATUM_WITH_TOWGS84

2012-05-22 Thread G. Allegri
Giovanni, I'm afraid I don't really follow your point.  Are you wanting to be able to do something like -t_srs GFOSSIT:3033 ? No Frank, that would be a hell! :) I was just thinking about the relation that can be assumed between the epsg strings produced by gdal and the epsg codes from the

[gdal-dev] problems with gdal2tiles and querysize when tiling a raster

2012-01-07 Thread G. Allegri
I'm trying to use gdal2tiles to tile a not-georeferenced image (an old map). The image is a 5816x3961 color jpeg. Running the following command: gdal2tiles -p raster -z 0-3 myimage.jpg myimage_tiles I obtain 256x256 tile images but the content is wrongly rescaled. I noticed that the problem

Re: [gdal-dev] Debug/Release configuration on Visual

2011-11-03 Thread G. Allegri
I find very useful, for common debugging of C++ apps, to build in Release mode (/MD) but with debugging infos (/Zi) and removing optimization (/Od). With this flags I'm able to debug my app but I don't need to link against Debug libraries. giovanni ___

Re: [gdal-dev] Debug/Release configuration on Visual

2011-11-03 Thread G. Allegri
see differences with a Release + debug informations (which I suppose is made available thorugh the .pdb files). giovanni 2011/11/3 QUILLET Jean-Charles jean-charles.quil...@alyotech.fr *De la part de* G. Allegri *Envoyé :* jeudi 3 novembre 2011 13:29 I find very useful, for common

[gdal-dev] problems with calculations with very small numbers (near zero)

2011-10-31 Thread G. Allegri
Hi, I'm having some troubles with raster algebra on a raster with very small (near zero, but not). I'm using numpy (through python gdal) to do a multiplication, eg numpy.multiply(rasterarr,2), but I obtain the following raster stats: http://pastebin.com/hHiUrWwD. I suppose that

[gdal-dev] export 3D shapefile to 2D (-lco dim=2 not is not used by the shp driver)

2011-07-08 Thread G. Allegri
Looking at the shp driver I see that the -lco dim option is not used. Is there another way to tranform a 3D polygon to 2D thorugh ogr2ogr? thanks, giovanni ___ gdal-dev mailing list gdal-dev@lists.osgeo.org

Re: [gdal-dev] export 3D shapefile to 2D (-lco dim=2 not is not used by the shp driver)

2011-07-08 Thread G. Allegri
values. On Fri, Jul 8, 2011 at 6:19 PM, G. Allegri gioha...@gmail.com wrote: Looking at the shp driver I see that the -lco dim option is not used. Is there another way to tranform a 3D polygon to 2D thorugh ogr2ogr? thanks, giovanni ___ gdal-dev

[gdal-dev] gdal warp with approximate transformation seems a bit slow...

2011-06-01 Thread G. Allegri
I was doing some tests on Gvsig for raster reprojection, where gdal warp is used. Gvsig uses a default error threshold of 0.125, which AFAIK makes gdal warp fall back to an approximate transformation. Anyway the reprojection is quite slow, even if significantly faster then GDALGenImgProjTransform.

Re: [gdal-dev] gdal warp with approximate transformation seems a bit slow...

2011-06-01 Thread G. Allegri
you're right... I will investigate more. Thanks for the hint. [1]: http://www.gdal.org/gdalwarp.html On Wed, Jun 1, 2011 at 9:55 PM, G. Allegri gioha...@gmail.com wrote: I was doing some tests on Gvsig for raster reprojection, where gdal warp is used. Gvsig uses a default error threshold

Re: [gdal-dev] java imageio-ext gdal bindings: when a new build?

2010-08-27 Thread G. Allegri
2010 14:41:09, G. Allegri a écrit : I've written to the users ml for imageio-ext, but I see that it's activity is null. I try here, even if can be OT. I would like to know if there's a roadmap for the release of newer versions of imageio-ext/gdal. The actual version, released also with other

[gdal-dev] java imageio-ext gdal bindings: when a new build?

2010-08-26 Thread G. Allegri
I've written to the users ml for imageio-ext, but I see that it's activity is null. I try here, even if can be OT. I would like to know if there's a roadmap for the release of newer versions of imageio-ext/gdal. The actual version, released also with other third party sw (like uDig) still uses

Re: [gdal-dev] why ogr oracle connection is so slow?

2010-02-27 Thread G. Allegri
Very intereseting discussion. I don't have much experience neither in C++ nor in OCI programming, but the topic is very important and interesting and I will try to contribute somehow. I will start to deepen the argument making a comparison between the various adopted solutions (FDO, etc.). Thanks

[gdal-dev] why ogr oracle connection is so slow?

2010-02-26 Thread G. Allegri
In this period I'm working intensively with Oracle Spatial (on Windows XP), and I've had the occasion to use it from many perspectives: through Gvsig with its jdbc-based connector, ArcGis with the Interoperability Tools, etc. When I've decided to test the ogr driver I've seen it's times slower

Re: [gdal-dev] why ogr oracle connection is so slow?

2010-02-26 Thread G. Allegri
between fast loading and fast reading. Regards, Ivan  ---Original Message---  From: Frank Warmerdam warmer...@pobox.com  To: G. Allegri gioha...@gmail.com  Cc: gdal-dev@lists.osgeo.org  Subject: Re: [gdal-dev] why ogr oracle connection is so slow?  Sent: Feb 26 '10 11:39  G

[gdal-dev] Re: build gdal 1.6.2 with nmake and vc9

2009-11-29 Thread G. Allegri
SOLVED. Sorry, it was a problem with a wrong parameter in my nmale.opt which caused the DEBUG flag being set. giovanni 2009/11/29 G. Allegri gioha...@gmail.com I'm trying to compile/build gdal fo windows, with minimal external libraries set in nmake.opt (just expat and postgresql

[gdal-dev] clarifications anout gdal_wms, tilecache and gdaltindex

2009-09-17 Thread G. Allegri
Hello list I'm facing for the first time the need of serving a big raster dataset continuum though a Mapserver wms service. The data source, at the moment, is an ArcIms service (this comes for various reasons). I've considered two options to tile, cache and serve it: - use gdaltindex to use the

[gdal-dev] python/OGR error: interpreter crashes calling geometries method stored inside a python list

2009-05-06 Thread G. Allegri
I try to explain the problem. I need to setup a python list from a set of geometries extrcted from a multipolygon layer. I do the following (this is an excerpt, obviously): source = ogr.Open(self.selectionshape) layer = source.GetLayerByIndex(0) geometries = [] features = [layer.GetFeature(i) for

Re: [gdal-dev] python/OGR error: interpreter crashes calling geometries method stored inside a python list

2009-05-06 Thread G. Allegri
I imagined it was something with features scope. Thanks Howard, for now I will use your snippet... as I can't find a different way to prevent the problem. 2009/5/6 Howard Butler hobu@gmail.com: On May 6, 2009, at 10:02 AM, G. Allegri wrote: geometries = [features[i].GetGeometryRef() for i

[gdal-dev] best method to check points in polygon?

2009-05-06 Thread G. Allegri
I need to check points in polygon over various thousands of points and regional scale polygons. A for loop iteration + intersect() over the points geometries is absolutely inefficient. Is there a faster method? I'm on the way to test the Shpely iterators, but I would like to remain with OGR...

Re: [gdal-dev] best method to check points in polygon?

2009-05-06 Thread G. Allegri
is not the faster code on the earth! But it's faster then asserting Contains or Within, at least from my test. How would you use them to extract points from the two geometries, without iteration? 2009/5/6 Mateusz Loskot mate...@loskot.net: G. Allegri wrote: I need to check points in polygon over various

[gdal-dev] Python and GDAL 1.6: TypeError with geom.Transform()

2009-03-25 Thread G. Allegri
Hello list. I have problems with GDAL 1.6 and Python. I need to reproject some points, and I know I can use geom.Transform(my osgeo.osr.CoordinateTransformation object). The problem is that it raises the following error: TypeError: in method 'Geometry_Transform', argument 2 of type

[gdal-dev] gdb debug for grass g.proj crash in Windows Vista

2009-03-20 Thread G. Allegri
About the ticket http://trac.osgeo.org/grass/ticket/537, I've run gdb to make a simple traceback. This is what I get: (gdb) run -w Starting program: c:\OSGeo4W\apps\grass\grass-6.5.svn\bin/g.proj.exe -w [New thread 2856.0x364] Program received signal SIGTRAP, Trace/breakpoint trap. 0x77d47dff in

[gdal-dev] Re: error with jpeglib while compiling 1.5.4 with MinGW

2009-03-19 Thread G. Allegri
the configure to internal exlude my jpeglib, but it's not the solution I would like! Any hint? 2009/3/19 G. Allegri gioha...@gmail.com: Hi. I'm trying to compile gdal 1.5.4 with msys+mingw 5.4.1. I have problems linking the jpeglib, as internal. My configure command is: ./configure --prefix=/usr/local