Re: [gdal-dev] Row count limit in OGR SQL with -dialect=SQLITE
Jukka Rahkonen jukka.rahkonen at mmmtike.fi writes: Hi, The following SQL works fine when using Spatialite as source osm_dataogrinfo osm.sqlite -dialect SQLITE -sql select * from lines where highway is not null limit 20 With native OSM data it fails OSM_dataogrinfo -dialect SQLITE finland.osm.pbf -sql select * from lines limit 20 Had to open data source read-only. INFO: Open of `finland.osm.pbf' using driver `OSM' successful. ERROR 1: Too many features have accumulated in points layer. Use OGR_INTERLEAVED _READING=YES mode This seems to work now just fine with GDAL r24984. -Jukka- ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] GDAL Python bindings disables setting a non-zero exit code
2012/9/27 Luke Pinner pinner.l...@gmail.com Thanks Jason, it's definitely GDAL. The order doesn't matter and I've checked ERRORLEVEL v. %ERRORLEVEL% (see below). I don't think it's related to the batch file which is just a minimal test script. The issue occurs with every Windows python script I've written that imports gdal - i.e sys.exit(anything 0) will always set an exit code of 0 if gdal is imported. Running python from the command prompt does the same thing. set pycmd=python -c from osgeo import gdal;import sys;sys.exit(1) echo %pycmd% %pycmd% if ERRORLEVEL 1 ( echo ERROR LEVEL is 1 or greater ) ELSE ( echo ERROR LEVEL is incorrect ) echo ERROR LEVEL=%ERRORLEVEL% Interestingly, one of the users of my code who originally reported the issue to me found that that ERRORLEVEL is set correctly in Windows XP. Yes Luke I made another check exluding MetaGETA imports, the software using GDAL python bindings, an it really seems related to GDAl, at least the GDAL release shipped with MetaGETA. On my workstation, a Windows XP 32 bit SP3 this is the output: Microsoft Windows XP [Versione 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. D:\Appl\MetaGETApython Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import sys sys.exit(15) D:\Appl\MetaGETAecho %ERRORLEVEL% 15 D:\Appl\MetaGETApython Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import sys from osgeo import ogr sys.exit(15) D:\Appl\MetaGETAecho %ERRORLEVEL% 15 On a Windows 2008 R2 64 bit it doesn't work Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. E:\Appl\MetaGETApython Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import sys sys.exit(15) E:\Appl\MetaGETAecho %ERRORLEVEL% 15 E:\Appl\MetaGETApython Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import sys from osgeo import ogr sys.exit(15) E:\Appl\MetaGETAecho %ERRORLEVEL% 0 I'll file a ticket in TRAC. --- 41.95581N 12.52854E http://www.linkedin.com/in/stefanoiacovella http://twitter.com/#!/Iacovellas ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Gdaltindex with -t_srs and Mapserver
Hi, I had a try with gdaltindex and the new -t_srs option that is discussed in http://trac.osgeo.org/gdal/ticket/4773. It seems to be as Even was thinking in the very beginning and Mapserver does not work with tileindex which is containing reprojected bounding boxes. Images with BBOX in the native projection are shown but not the others. This line appears into Mapserver log: msDrawRasterLayerGDAL(): Error in overlap calculation. It might indeed be good to emit a warning about Mapserver incompability. It would be very nice if Mapserver supports this kind of tileindeces. -Jukka Rahkonen- ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Gdaltindex with -t_srs and Mapserver
Selon Jukka Rahkonen jukka.rahko...@mmmtike.fi: Hi, I had a try with gdaltindex and the new -t_srs option that is discussed in http://trac.osgeo.org/gdal/ticket/4773. It seems to be as Even was thinking in the very beginning and Mapserver does not work with tileindex which is containing reprojected bounding boxes. Images with BBOX in the native projection are shown but not the others. This line appears into Mapserver log: msDrawRasterLayerGDAL(): Error in overlap calculation. It might indeed be good to emit a warning about Mapserver incompability. This is documented in http://gdal.org/gdaltindex.html : If -t_srs is specified, geometries of input files will be transformed to the desired target projection system. Note that using this option generates files that are NOT compatible with MapServer. It would be very nice if Mapserver supports this kind of tileindeces. Something to raise on MapServer lists. This would imply that MapServer takes into account the SRS of each GDAL dataset, which AFAIK it ignores right now to use only the SRS indicated in the LAYER (but it has been quite a long time since I configured a MapServer mapfile, so I might be wrong), to do the needed on-the-fly reprojection -Jukka Rahkonen- ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] geotiff
Hi Can anyone tell me how to display geotiff image in a dotspatial map using c#. With Regards, Neelima Emmani ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Gdaltindex with -t_srs and Mapserver
Jukka, nice that you noticed this new feature I added - was about to advertise it here! The goal of adding this feature was not to make it available in mapserver, but for using in desktop applications as a reference for multiple files with different projections (e.g. landsat archives). cheers Etienne On Thu, Sep 27, 2012 at 6:07 AM, Jukka Rahkonen jukka.rahko...@mmmtike.fi wrote: Hi, I had a try with gdaltindex and the new -t_srs option that is discussed in http://trac.osgeo.org/gdal/ticket/4773. It seems to be as Even was thinking in the very beginning and Mapserver does not work with tileindex which is containing reprojected bounding boxes. Images with BBOX in the native projection are shown but not the others. This line appears into Mapserver log: msDrawRasterLayerGDAL(): Error in overlap calculation. It might indeed be good to emit a warning about Mapserver incompability. It would be very nice if Mapserver supports this kind of tileindeces. -Jukka Rahkonen- ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Gdaltindex with -t_srs and Mapserver
Hi, I did not meant to underestimate this little but extremely useful improvement. However, you made me hungry: if you can see so simply the image footprints, why not also the images? I am already publishing in our WMS also the tileindex shapefiles so people can see the image boundaries and make GetFeatureInfo queries from the image metadata that we have added to the shapefile as a few extra fields. In order to make it works we have reprojected images from their original projection zones into one common zone. Now I wonder if it could be possible to make Mapserver to support tileindex layers containing source images with mixed projections. As a non-programmer I have a strong belief that if I can say what I want, someone can program it. I believe that Mapserver already gets the correct image list from the mixed-projection shapefile. I guess also that Mapserver does not read image metadata from the geotiff image files for getting the projection but it relies on the LAYER level PROJECTION setting. In my simple test case with two images, one in EPSG:2393 and another in EPSG:2392 this means that Mapserver thinks that images are 1000 kilometers apart and sharing the EPSG:2393 system that I used in the PROJECTION block. Perhaps there could be an optional setting for LAYER level PROJECTION, both for individual images and tileindex layers, something like init:internal_metadata. It would mean that Mapserver would do first a query in a same manner than gdalinfo and ogrinfo for reading the native projection of the dataset. Ok, once written this long I started to think about using PROJECTION AUTO and then I found this three-year-old RFC http://mapserver.org/development/rfc/ms-rfc-37.html +1 for implementing it. By the way, woudn't it be nice if desktop GIS like QGIS would show you also your Landsat archive images and not only the footprints in some pretty automatic way, let's say, after ticking a check box and setting the maximum scale denominator value? -Jukka Rahkonen- -Alkuperäinen viesti- Lähettäjä: Etienne Tourigny [mailto:etourigny@gmail.com] Lähetetty: 27. syyskuuta 2012 15:27 Vastaanottaja: Rahkonen Jukka Kopio: gdal-dev@lists.osgeo.org Aihe: Re: [gdal-dev] Gdaltindex with -t_srs and Mapserver Jukka, nice that you noticed this new feature I added - was about to advertise it here! The goal of adding this feature was not to make it available in mapserver, but for using in desktop applications as a reference for multiple files with different projections (e.g. landsat archives). cheers Etienne On Thu, Sep 27, 2012 at 6:07 AM, Jukka Rahkonen jukka.rahko...@mmmtike.fi wrote: Hi, I had a try with gdaltindex and the new -t_srs option that is discussed in http://trac.osgeo.org/gdal/ticket/4773. It seems to be as Even was thinking in the very beginning and Mapserver does not work with tileindex which is containing reprojected bounding boxes. Images with BBOX in the native projection are shown but not the others. This line appears into Mapserver log: msDrawRasterLayerGDAL(): Error in overlap calculation. It might indeed be good to emit a warning about Mapserver incompability. It would be very nice if Mapserver supports this kind of tileindeces. -Jukka Rahkonen- ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Gdaltindex with -t_srs and Mapserver
Forwarding this email to qgis-dev list - Regarding tileindex usage with preview image inside qgis. On Thu, Sep 27, 2012 at 10:30 AM, Rahkonen Jukka jukka.rahko...@mmmtike.fi wrote: Hi, I did not meant to underestimate this little but extremely useful improvement. However, you made me hungry: if you can see so simply the image footprints, why not also the images? I am already publishing in our WMS also the tileindex shapefiles so people can see the image boundaries and make GetFeatureInfo queries from the image metadata that we have added to the shapefile as a few extra fields. In order to make it works we have reprojected images from their original projection zones into one common zone. Now I wonder if it could be possible to make Mapserver to support tileindex layers containing source images with mixed projections. As a non-programmer I have a strong belief that if I can say what I want, someone can program it. I believe that Mapserver already gets the correct image list from the mixed-projection shapefile. I guess also that Mapserver does not read image metadata from the geotiff image files for getting the projection but it relies on the LAYER level PROJECTION setting. In my simple test case with two images, one in EPSG:2393 and another in EPSG:2392 this means that Mapserver thinks that images are 1000 kilometers apart and sharing the EPSG:2393 system that I used in the PROJECTION block. Perhaps there could be an optional setting for LAYER level PROJECTION, both for individual images and tileindex layers, something like init:internal_metadata. It would mean that Mapserver would do first a query in a same manner than gdalinfo and ogrinfo for reading the native projection of the dataset. Ok, once written this long I started to think about using PROJECTION AUTO and then I found this three-year-old RFC http://mapserver.org/development/rfc/ms-rfc-37.html +1 for implementing it. By the way, woudn't it be nice if desktop GIS like QGIS would show you also your Landsat archive images and not only the footprints in some pretty automatic way, let's say, after ticking a check box and setting the maximum scale denominator value? It would be great to see such a thing in QGIS - any way that mapserver code could be useful to QGIS? Or better yet - have a control in the tileindex layer to open the associated raster layer? -Jukka Rahkonen- -Alkuperäinen viesti- Lähettäjä: Etienne Tourigny [mailto:etourigny@gmail.com] Lähetetty: 27. syyskuuta 2012 15:27 Vastaanottaja: Rahkonen Jukka Kopio: gdal-dev@lists.osgeo.org Aihe: Re: [gdal-dev] Gdaltindex with -t_srs and Mapserver Jukka, nice that you noticed this new feature I added - was about to advertise it here! The goal of adding this feature was not to make it available in mapserver, but for using in desktop applications as a reference for multiple files with different projections (e.g. landsat archives). cheers Etienne On Thu, Sep 27, 2012 at 6:07 AM, Jukka Rahkonen jukka.rahko...@mmmtike.fi wrote: Hi, I had a try with gdaltindex and the new -t_srs option that is discussed in http://trac.osgeo.org/gdal/ticket/4773. It seems to be as Even was thinking in the very beginning and Mapserver does not work with tileindex which is containing reprojected bounding boxes. Images with BBOX in the native projection are shown but not the others. This line appears into Mapserver log: msDrawRasterLayerGDAL(): Error in overlap calculation. It might indeed be good to emit a warning about Mapserver incompability. It would be very nice if Mapserver supports this kind of tileindeces. -Jukka Rahkonen- ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] SetColorTable() issues on GTiff with python bindings
Hello, I would like to add a Colortable to a GeoTiff. Running the SetColorTable() function, python returns 3. GetColorTable() returns empty, no colortable is attached. After browsing the internet for a solution, I tried to run the procedure on a newly created GTiff (which was often suggested). Probably any issues with the colortable? The file is not Write-protected or problematic otherwise, WriteArray() for example works without any problem. ds2=dr.Create('C:\\testfolder\\X.tif',ds.RasterXSize,ds.RasterYSize,1,gdal.GDT_Int16) ct=gdal.ColorTable() ct.CreateColorRamp(0,(178,223,138),5,(255,127,0)) outband=ds2.GetRasterBand(1) outband.SetColorTable(ct) # returns 3 Versions: python 2.7 gdal 1.9.1 Any Suggestions? Thanks for your help -- View this message in context: http://osgeo-org.1560.n6.nabble.com/SetColorTable-issues-on-GTiff-with-python-bindings-tp5004969.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] SetColorTable() issues on GTiff with python bindings
Selon Ingmar N ini...@ucc.ie: Hello, I would like to add a Colortable to a GeoTiff. Running the SetColorTable() function, python returns 3. GetColorTable() returns empty, no colortable is attached. After browsing the internet for a solution, I tried to run the procedure on a newly created GTiff (which was often suggested). Probably any issues with the colortable? The file is not Write-protected or problematic otherwise, WriteArray() for example works without any problem. ds2=dr.Create('C:\\testfolder\\X.tif',ds.RasterXSize,ds.RasterYSize,1,gdal.GDT_Int16) ct=gdal.ColorTable() ct.CreateColorRamp(0,(178,223,138),5,(255,127,0)) outband=ds2.GetRasterBand(1) outband.SetColorTable(ct) # returns 3 Versions: python 2.7 gdal 1.9.1 Any Suggestions? You should have seen the following error emitted in the console : SetColorTable() only supported for Byte or UInt16 bands in TIFF format. . The data type asked in Create() is Int16, not Byte or UInt16. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] SetColorTable() issues on GTiff with python bindings
Unfortunately, the only output I received was 3, which did not help me a lot. It seems to work now with GDT_Byte, although I thought I used it before. Nonetheless, Thanks for your help -- View this message in context: http://osgeo-org.1560.n6.nabble.com/SetColorTable-issues-on-GTiff-with-python-bindings-tp5004969p5004974.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] geotiff
Neelima, Please refer to the DotSpatial docs at http://dotspatial.codeplex.com/documentation On Thu, Sep 27, 2012 at 5:26 PM, Neelima Emmani neelima.emm...@iictechnologies.com wrote: Hi Can anyone tell me how to display geotiff image in a dotspatial map using c#. With Regards, Neelima Emmani ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev -- Best regards, Chaitanya kumar CH. +91-9494447584 17.2416N 80.1426E ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] geotiff
Hi We tried to open raster file as in suggested document . But unfortunately our application is not accepting any file path in the raster.open() method. Can you please tell me if I am missing any dlls. In addition to gdal_csharp , we also added a reference to DotSpatial.Data.Rasters.GdalExtension. Suggested in doc - Raster r = new Raster(); r.Open(@[Your Folder]\Ex3\Data\DEM\Elevation.bgd); Practical in my application - Raster r = new Raster(); r.Open(); With Regards, Neelima Emmani From: Chaitanya kumar CH [chaitanya...@gmail.com] Sent: Friday, September 28, 2012 8:33 AM To: Neelima Emmani Cc: gdal-dev@lists.osgeo.org Subject: Re: [gdal-dev] geotiff Neelima, Please refer to the DotSpatial docs at http://dotspatial.codeplex.com/documentation On Thu, Sep 27, 2012 at 5:26 PM, Neelima Emmani neelima.emm...@iictechnologies.commailto:neelima.emm...@iictechnologies.com wrote: Hi Can anyone tell me how to display geotiff image in a dotspatial map using c#. With Regards, Neelima Emmani ___ gdal-dev mailing list gdal-dev@lists.osgeo.orgmailto:gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev -- Best regards, Chaitanya kumar CH. +91-9494447584 17.2416N 80.1426E ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev