[gdal-dev] OGR and Sel by Attributes
Dear friends, Can you please give me an example of Selection by Attributes using OGR library. In other words, I need an example of OGRDataSource::ExecuteSQL(...). With thanks, Yours sincerely, B. Ramesh ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Transparency mask (alpha band) in ECW
Jukka, Even, Here is an example of ECW v2 with opacity. https://trac.osgeo.org/gdal/ticket/6028 Regards. Jacek Tomaka -Original Message- From: gdal-dev-boun...@lists.osgeo.org [mailto:gdal-dev-boun...@lists.osgeo.org] On Behalf Of Even Rouault Sent: Wednesday, 8 July 2015 8:08 PM To: gdal-dev@lists.osgeo.org Cc: Jukka Rahkonen Subject: Re: [gdal-dev] Transparency mask (alpha band) in ECW Le mercredi 08 juillet 2015 14:01:47, Jukka Rahkonen a écrit : > Even Rouault spatialys.com> writes: > > > GDAL ECW driver does not have support for this. I wonder if it > > > could be doable and if I should make a feature request. I also > > > wonder if GDAL can decode ECW files which have transparency mask > > > correctly. > > > > Jukka, > > > > I'm a bit confused by the above. If you look to the bottom of the > > page you mentio,n you'll see a gdalinfo report with an alpha band. > > > > And I've just tried with a test file of the autotest suite: > > > > gdalinfo ../gdrivers/data/stefan_full_rgba_ecwv3_meta.ecw > > > > > This is a ECWv3 file. I don't have an example with ECWv2 and the > > "appended" mask, but I believe the driver should also likely be able > > to read/write this (but I haven't a ECWv2 image with alpha handy) > > Hi Even, > > I apologize, No problem > I do not use ECW myself nowadays but I was reading this > gis.stackexchange question which deals actually with FME > http://gis.stackexchange.com/questions/153490/how-to-convert-tif-to-ec > w-wit > h-fme-maintaining-a-certain-value?noredirect=1#comment225797_153490 > > Then I read our ECW manual page http://www.gdal.org/frmt_ecw.html > which does not talk anything about nodata, alpha, transparency etc. I > just thought that we can't handle nodata any better than FME but > obviously we can. I do not have SDK license so I could not test ECW output > myself. > > Is the ECW transparency band created automatically if user has > Read/Write SDK >= 4.0 and source data has either alpha channel or > nodata set in GeoTIFF? As far as I understand the code, yes that should be automatic if the 4th band of the source raster is advertized as an Alpha channel. > ECW driver does not seem to have any creation option for that but > perhaps it is not necessary. > > -Jukka- > > > ___ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/gdal-dev -- Spatialys - Geospatial professional services http://www.spatialys.com ___ 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] Accelerate Raster Calculation
Hi, I have been using gdal raster Calculator because it is much faster (but less flexible) then QGIS internal calculator. I know that R has a raster package but I have seen reports of this being slow also. Look for R Raster package. Of course, hopefully there may be a answer found here. If so, I would liked to be kept informed on this conversation as my data will soon get much larger. Thanks! Nicolas Cadieux M.Sc. Les Entreprises Archéotec inc. 8548, rue Saint-Denis Montréal H2P 2H2 Téléphone: 514.381.5112 Fax: 514.381.4995 www.archeotec.ca On Jul 8, 2015 9:13 AM, Yuta Sato wrote:Dear GDAL Developers:I am doing raster calculation by reading the bands as numpy array, doing numpy calculation, and writing back the numpy array. But seems pretty slower, what is the faster way to do it? ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Accelerate Raster Calculation
Dear GDAL Developers: I am doing raster calculation by reading the bands as numpy array, doing numpy calculation, and writing back the numpy array. But seems pretty slower, what is the faster way to do it? ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Transparency mask (alpha band) in ECW
Le mercredi 08 juillet 2015 14:01:47, Jukka Rahkonen a écrit : > Even Rouault spatialys.com> writes: > > > GDAL ECW driver does not have support for this. I wonder if it could be > > > doable and if I should make a feature request. I also wonder if GDAL > > > can decode ECW files which have transparency mask correctly. > > > > Jukka, > > > > I'm a bit confused by the above. If you look to the bottom of the page > > you mentio,n you'll see a gdalinfo report with an alpha band. > > > > And I've just tried with a test file of the autotest suite: > > > > gdalinfo ../gdrivers/data/stefan_full_rgba_ecwv3_meta.ecw > > > > > This is a ECWv3 file. I don't have an example with ECWv2 and the > > "appended" mask, but I believe the driver should also likely be able to > > read/write this (but I haven't a ECWv2 image with alpha handy) > > Hi Even, > > I apologize, No problem > I do not use ECW myself nowadays but I was reading this > gis.stackexchange question which deals actually with FME > http://gis.stackexchange.com/questions/153490/how-to-convert-tif-to-ecw-wit > h-fme-maintaining-a-certain-value?noredirect=1#comment225797_153490 > > Then I read our ECW manual page http://www.gdal.org/frmt_ecw.html which > does not talk anything about nodata, alpha, transparency etc. I just > thought that we can't handle nodata any better than FME but obviously we > can. I do not have SDK license so I could not test ECW output myself. > > Is the ECW transparency band created automatically if user has Read/Write > SDK >= 4.0 and source data has either alpha channel or nodata set in > GeoTIFF? As far as I understand the code, yes that should be automatic if the 4th band of the source raster is advertized as an Alpha channel. > ECW driver does not seem to have any creation option for that but > perhaps it is not necessary. > > -Jukka- > > > ___ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/gdal-dev -- Spatialys - Geospatial professional services http://www.spatialys.com ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Transparency mask (alpha band) in ECW
Even Rouault spatialys.com> writes: > > > > GDAL ECW driver does not have support for this. I wonder if it could be > > doable and if I should make a feature request. I also wonder if GDAL can > > decode ECW files which have transparency mask correctly. > > Jukka, > > I'm a bit confused by the above. If you look to the bottom of the page you > mentio,n you'll see a gdalinfo report with an alpha band. > > And I've just tried with a test file of the autotest suite: > > gdalinfo ../gdrivers/data/stefan_full_rgba_ecwv3_meta.ecw > This is a ECWv3 file. I don't have an example with ECWv2 and the "appended" > mask, but I believe the driver should also likely be able to read/write this > (but I haven't a ECWv2 image with alpha handy) Hi Even, I apologize, I do not use ECW myself nowadays but I was reading this gis.stackexchange question which deals actually with FME http://gis.stackexchange.com/questions/153490/how-to-convert-tif-to-ecw-with-fme-maintaining-a-certain-value?noredirect=1#comment225797_153490 Then I read our ECW manual page http://www.gdal.org/frmt_ecw.html which does not talk anything about nodata, alpha, transparency etc. I just thought that we can't handle nodata any better than FME but obviously we can. I do not have SDK license so I could not test ECW output myself. Is the ECW transparency band created automatically if user has Read/Write SDK >= 4.0 and source data has either alpha channel or nodata set in GeoTIFF? ECW driver does not seem to have any creation option for that but perhaps it is not necessary. -Jukka- ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Attempting to access an ArcGIS REST API through a WMS format minidriver
Hi James, As the server didn't provide information about levels, some help needed to calculate this values. Also the all layers switched off, so we need to tell which layers should be shown. I create such xml file based on information from here: https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty=true https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer png show:1,2,3 xyXY 3857 -1821098.1612395868 9441422.428028269 1157719.0542395862 6462605.212549096 1024 1024 $ gdal_translate -of PNG ~/tmp/ags.xml ~/tmp/ags_test.png --config CPL_DEBUG ON GDAL: GDALOpen(/home/bishop/tmp/ags.xml, this=0x15138c0) succeeds as WMS. Input file size is 512, 512 AGS: URL = https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer/export?f=image&bbox=-1821098.16123959,6462605.21254910,1157719.05423959,9441422.42802827&size=512,512&dpi=&imageSR=3857&bboxSR=3857&format=png&layerdefs=&layers=show:1,2,3&transparent=false&time=&layerTimeOptions=&dynamicLayers= HTTP: Requesting [1/1] https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer/export?f=image&bbox=-1821098.16123959,6462605.21254910,1157719.05423959,9441422.42802827&size=512,512&dpi=&imageSR=3857&bboxSR=3857&format=png&layerdefs=&layers=show:1,2,3&transparent=false&time=&layerTimeOptions=&dynamicLayers= HTTP: Request [0] https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer/export?f=image&bbox=-1821098.16123959,6462605.21254910,1157719.05423959,9441422.42802827&size=512,512&dpi=&imageSR=3857&bboxSR=3857&format=png&layerdefs=&layers=show:1,2,3&transparent=false&time=&layerTimeOptions=&dynamicLayers= : status = 200, content type = image/png, error = (null) GDAL: GDALOpen(/vsimem/wms/0x15dc720/wmsresult.dat, this=0x15c3d00) succeeds as PNG. GDAL: GDALClose(/vsimem/wms/0x15dc720/wmsresult.dat, this=0x15c3d00) 0...10...20...30...40...50...60...70...80...90...100 - done. GDAL: GDALClose(/home/bishop/tmp/ags_test.png, this=0x1599830) GDAL: GDALClose(/home/bishop/tmp/ags.xml, this=0x15138c0) Also I test this xml in QGIS - works fine. Best regards, Dmitry 07.07.2015 18:42, Passmore, James H. пишет: >Fromhttp://www.gdal.org/frmt_wms.html I see you can access an ArcGIS REST API like: gdalinfo"http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=json&pretty=true"; and gdal_translate"http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=json"; wms.xml -of WMS These above examples work for me. When I try on a BGS service it fails as below: ...:\>gdalinfo"https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty=true"; gdalinfo failed - unable to open 'https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty= true'. And: ..:\>gdal_translate"https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty=true"; bgs.xml -of WMS --debug ON GDAL: Auto register C:\apps\gisinternals\bin\gdaL\plugins\gdal_BAG.dll using GDALRegister_BAG. GDAL: Auto register C:\apps\gisinternals\bin\gdaL\plugins\gdal_ECW_JP2ECW.dll using GDALRegister_ECW_JP2ECW. GDAL: Auto register C:\apps\gisinternals\bin\gdaL\plugins\gdal_FITS.dll using GDALRegister_FITS. GDAL: Auto register C:\apps\gisinternals\bin\gdaL\plugins\gdal_GMT.dll using GDALRegister_GMT. GDAL: Auto register C:\apps\gisinternals\bin\gdaL\plugins\gdal_HDF4.dll using GDALRegister_HDF4. GDAL: Auto register C:\apps\gisinternals\bin\gdaL\plugins\gdal_HDF4Image.dll using GDALRegister_HDF4Image. GDAL: Auto register C:\apps\gisinternals\bin\gdaL\plugins\gdal_HDF5.dll using GDALRegister_HDF5. GDAL: Auto register C:\apps\gisinternals\bin\gdaL\plugins\gdal_HDF5Image.dll using GDALRegister_HDF5Image. GDAL: Auto register C:\apps\gisinternals\bin\gdaL\plugins\gdal_KEA.dll using GDALRegister_KEA. GDAL: Auto register C:\apps\gisinternals\bin\gdaL\plugins\gdal_MG4Lidar.dll using GDALRegister_MG4Lidar. GDAL: Auto register C:\apps\gisinternals\bin\gdaL\plugins\gdal_MrSID.dll using GDALRegister_MrSID. GDAL: Auto register C:\apps\gisinternals\bin\gdaL\plugins\gdal_netCDF.dll using GDALRegister_netCDF. HTTP: Fetch(https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty=true) WMS: Did not get levels HTTP: Fetch(https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty=true) GDALOpen failed - 0 Is the reason that HTTPS is not supported here at all, or if not what might be wrong with the service/request/ configuration? Thanks James This message (and any attachments) is for the recipient only. NERC is subject to the Freedom of Information Act 2000 and the contents of this email and any reply you make may be disclosed by NERC unless it is exempt from release under the Act. Any material supplied to NERC may be stored in an electronic records man
Re: [gdal-dev] Transparency mask (alpha band) in ECW
Le mercredi 08 juillet 2015 12:46:27, Jukka Rahkonen a écrit : > Hi, > > Nodata values with lossy compression like JPEG, ECW, or JPEG2000 do not > really work. I noticed that newest ECW SDK versions (>= 4) have support for > using a transparency mask: > > http://blog.hexagongeospatial.com/help-ecw-speckled-edges/ > > "Using the ECWJP2 SDK terminology, a transparency mask is implemented as an > opacity band called AllOpacity." > > GDAL ECW driver does not have support for this. I wonder if it could be > doable and if I should make a feature request. I also wonder if GDAL can > decode ECW files which have transparency mask correctly. Jukka, I'm a bit confused by the above. If you look to the bottom of the page you mentio,n you'll see a gdalinfo report with an alpha band. And I've just tried with a test file of the autotest suite: gdalinfo ../gdrivers/data/stefan_full_rgba_ecwv3_meta.ecw Driver: ECW/ERDAS Compressed Wavelets (SDK 5.0) Files: ../gdrivers/data/stefan_full_rgba_ecwv3_meta.ecw Size is 162, 150 Coordinate System is `' Metadata: CLOCKWISE_ROTATION_DEG=0.00 COLORSPACE=RGB COMPRESSION_DATE=2013-04-04T09:20:03Z COMPRESSION_RATE_ACTUAL=3.165093 COMPRESSION_RATE_TARGET=20 FILE_METADATA_ACQUISITION_DATE=2012-09-12 FILE_METADATA_ACQUISITION_SENSOR_NAME=Leica ADS-80 FILE_METADATA_ADDRESS=2 Abbotsford Street, West Leederville WA 6007 Australia FILE_METADATA_AUTHOR=Unknown FILE_METADATA_CLASSIFICATION=test gdal image FILE_METADATA_COMPANY=ERDAS-QA FILE_METADATA_COMPRESSION_SOFTWARE=python2.7/GDAL v1.10.0.0/ECWJP2 SDK v5.0.0.0 FILE_METADATA_COPYRIGHT=Intergraph 2013 FILE_METADATA_EMAIL=supp...@intergraph.com FILE_METADATA_TELEPHONE=+61 8 9388 2900 VERSION=3 Corner Coordinates: Upper Left (0.0,0.0) Lower Left (0.0, 150.0) Upper Right ( 162.0,0.0) Lower Right ( 162.0, 150.0) Center ( 81.0, 75.0) Band 1 Block=256x256 Type=Byte, ColorInterp=Red Description = Red Overviews: arbitrary Mask Flags: PER_DATASET ALPHA Band 2 Block=256x256 Type=Byte, ColorInterp=Green Description = Green Overviews: arbitrary Mask Flags: PER_DATASET ALPHA Band 3 Block=256x256 Type=Byte, ColorInterp=Blue Description = Blue Overviews: arbitrary Mask Flags: PER_DATASET ALPHA Band 4 Block=256x256 Type=Byte, ColorInterp=Alpha Description = AllOpacity Overviews: arbitrary This is a ECWv3 file. I don't have an example with ECWv2 and the "appended" mask, but I believe the driver should also likely be able to read/write this (but I haven't a ECWv2 image with alpha handy) Even -- Spatialys - Geospatial professional services http://www.spatialys.com ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Transparency mask (alpha band) in ECW
Hi, Nodata values with lossy compression like JPEG, ECW, or JPEG2000 do not really work. I noticed that newest ECW SDK versions (>= 4) have support for using a transparency mask: http://blog.hexagongeospatial.com/help-ecw-speckled-edges/ "Using the ECWJP2 SDK terminology, a transparency mask is implemented as an opacity band called AllOpacity." GDAL ECW driver does not have support for this. I wonder if it could be doable and if I should make a feature request. I also wonder if GDAL can decode ECW files which have transparency mask correctly. -Jukka Rahkonen- ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev