Re: [mapserver-users] kml superoverlays
Hi, I've debugged the kml driver, and I've managed to solve my problem making some minor changes in kmlsuperoverlaydataset.cpp. See the ticket, and the attached source code: https://trac.osgeo.org/gdal/ticket/6343 Use it up if you think so. Regards, Hunor On 2016.01.27. 19:10, Even Rouault wrote: Hunor, I cannot open any data set where the depth of nested levels is greater than 1. Is this limitation by design, or the code is under development? I don't recall the details to say if it is by design or just because it was not needed at time this was developed, but it is non trivial to turn a .kml into a valid GDAL dataset. So the code currently only probably works with some formulations of KML, like the one at http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml A first step would be to file a ticket in GDAL Trac with the KML file that shows the issue. If so, when it will be available the support of deeply nested kml superoverlays? I'm not aware of anyone actively working on the driver currently. So as often in open source, the key to make things go forward is either to contribute patches or fund someone to do the work. Best regards, Even -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] kml superoverlays
Hi, I cannot open any data set where the depth of nested levels is greater than 1. Is this limitation by design, or the code is under development? If so, when it will be available the support of deeply nested kml superoverlays? Thanks. Regards, Hunor GDALDataset *KmlSuperOverlayReadDataset::Open(const char* pszFilename, KmlSuperOverlayReadDataset* poParent, int nRec) { if( nRec == 2 ) return NULL; On 2016.01.15. 18:35, Even Rouault wrote: GDAL ticket: https://trac.osgeo.org/gdal/ticket/6311 Fixed in 2.0 and trunk branches. 1.11 was fine. -jeff -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] kml superoverlays
Hunor, > > I cannot open any data set where the depth of nested levels is greater > than 1. > Is this limitation by design, or the code is under development? I don't recall the details to say if it is by design or just because it was not needed at time this was developed, but it is non trivial to turn a .kml into a valid GDAL dataset. So the code currently only probably works with some formulations of KML, like the one at http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml A first step would be to file a ticket in GDAL Trac with the KML file that shows the issue. > If so, > when it will be available the support of deeply nested kml superoverlays? I'm not aware of anyone actively working on the driver currently. So as often in open source, the key to make things go forward is either to contribute patches or fund someone to do the work. Best regards, Even -- Spatialys - Geospatial professional services http://www.spatialys.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] kml superoverlays
Hi, Thank you for this short discussion, now I think there is light at the end of the tunnel. I tried solve my problem with MapServer 6.4.1 and GDAL 1.9, but that gdal version has write-only support for kml superoverlays. First step is to change GDAL version in my project... Hunor On 2016.01.15. 0:28, Jeff McKenna wrote: On 2016-01-14 6:55 PM, Even Rouault wrote: Hum I didn't try with MapServer, but looking at the GDAL request it does in the logs, I tried something close with gdal_translate: gdal_translate /vsicurl/http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml out2.tif -outsize 312 300 and the good or bad news is that fails on both Ubuntu and Windows (well at least on wine/Linux) with a similar error to yours: VSICURL: Start download for http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-070501/422.kml VSICURL: Stop download for http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-070501/422.kml VSICURL: Start download for http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-070501/422.JPEG VSICURL: Stop download for http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-070501/422.JPEG GDAL: GDALOpen(/vsimem/kmlsuperoverlay/6_0x1d0f878, this=0x1d12bd0) succeeds as JPEG. GDAL: GDALDefaultOverviews::OverviewScan() GDAL: GDALDefaultOverviews::OverviewScan() ERROR 5: /vsimem/kmlsuperoverlay/3_0x1cf4ce8, band 1: Illegal nBlockXOff value (2) in GDALRasterBand::TryGetLockedBlockRef() ERROR 5: /vsimem/kmlsuperoverlay/3_0x1cf4ce8, band 1: Illegal nBlockXOff value (2) in GDALRasterBand::GetLockedBlockRef() Not sure why you get different results. Mind opening a GDAL ticket about that ? I'm debugging something else tricky right now ;-) GDAL ticket: https://trac.osgeo.org/gdal/ticket/6311 -jeff -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] kml superoverlays
> GDAL ticket: https://trac.osgeo.org/gdal/ticket/6311 Fixed in 2.0 and trunk branches. 1.11 was fine. > > -jeff -- Spatialys - Geospatial professional services http://www.spatialys.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] kml superoverlays
On 2016-01-14 4:51 PM, Even Rouault wrote: Could this 'OGRDB2DriverOpen' be the issue? This is just a harmelss debug message (that shouldn't be printed IMHO in the Open() method of the DB2 driver. cc'ing David) Shouldn't GDAL use the "KMLSUPEROVERLAY" driver here? (for the record that driver is listed in both my Windows and Ubuntu builds, through 'gdalinfo --formats'). No the issue is that the \ windows directory separator was used instead of / for http ressources. Just fixed with https://trac.osgeo.org/gdal/ticket/6310 You might get some extra open speedup by defining GDAL_DISABLE_READDIR_ON_OPEN=EMPTY as env. var/config. option (this prevents probing for (most) side-car files. This is not something to use in general however. Thanks Even, that worked! Now onto MapServer :) Unfortunately that same vsicurl superoverlay in MapServer-master works on Ubuntu, but now on Windows. Here is more details: Mapfile === MAP NAME "superoverlay" STATUS ON SIZE 400 300 EXTENT -122.1293127 37.3727086 -122.0593424 37.4398034 UNITS DD IMAGECOLOR 255 255 255 LAYER NAME "mountain-view-superoverlay" TYPE RASTER STATUS ON #DATA "mv-doqq.kml" DATA "/vsicurl/http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml; CLASS NAME "Superoverlay" STYLE END END END # layer END # Map File Test1: MapServer with superoverlay+VSICURL, on Windows == shp2img -m superoverlay-kml.map -o ttt.png -all_debug 5 result (fail) - msLoadMap(): 0.000s msDrawMap(): rendering using outputformat named png (AGG/PNG). msDrawMap(): WMS/WFS set-up and query, 0.000s msDrawRasterLayerLow(mountain-view-superoverlay): entering. msDrawRasterLayerGDAL(): Entering transform. msDrawRasterLayerGDAL(): src=0,0,16384,16384, dst=44,0,312,300 msDrawRasterLayerGDAL(): source raster PL (-4.888,-27.409) for dst PL (44,0). msDrawRasterLayerGDAL(): red,green,blue,alpha bands = 1,2,3,4 drawGDAL(): Unable to access file. GDALDatasetRasterIO() failed: /vsimem/kmlsuperoverlay/3 _085CA378, band 1: Illegal nBlockXOff value (2) in GDALRasterBand::GetLockedBlockRef() msDrawMap(): Image handling error. Failed to draw layer named 'mountain-view-superoverlay' . msDrawMap(): Image handling error. Failed to draw layer named 'mountain-view-superoverlay' . drawGDAL(): Unable to access file. GDALDatasetRasterIO() failed: /vsimem/kmlsuperoverlay/3 _085CA378, band 1: Illegal nBlockXOff value (2) in GDALRasterBand::GetLockedBlockRef() msFreeMap(): freeing map at 061BA7F0. freeLayer(): freeing layer at 07273208. Test2: MapServer with superoverlay+VSICURL, on Ubuntu == $ shp2img -m superoverlay-kml.map -o ttt.png -all_debug 5 result (success) [Thu Jan 14 18:20:02 2016].525687 msLoadMap(): 0.000s [Thu Jan 14 18:20:02 2016].525906 msDrawMap(): rendering using outputformat named png (AGG/PNG). [Thu Jan 14 18:20:02 2016].525919 msDrawMap(): WMS/WFS set-up and query, 0.000s [Thu Jan 14 18:20:02 2016].527354 msDrawRasterLayerLow(mountain-view-superoverlay): entering. [Thu Jan 14 18:20:11 2016].774926 msDrawRasterLayerGDAL(): Entering transform. [Thu Jan 14 18:20:11 2016].774950 msDrawRasterLayerGDAL(): src=0,0,16384,16384, dst=44,0,312,300 [Thu Jan 14 18:20:11 2016].774955 msDrawRasterLayerGDAL(): source raster PL (-4.888,-27.409) for dst PL (44,0). [Thu Jan 14 18:20:11 2016].774969 msDrawRasterLayerGDAL(): red,green,blue,alpha bands = 1,2,3,4 [Thu Jan 14 18:20:13 2016].225477 msDrawMap(): Layer 0 (mountain-view-superoverlay), 10.700s [Thu Jan 14 18:20:13 2016].225507 msDrawMap(): Drawing Label Cache, 0.000s [Thu Jan 14 18:20:13 2016].225512 msDrawMap() total time: 10.700s [Thu Jan 14 18:20:13 2016].244934 msSaveImage(ttt.png) total time: 0.019s [Thu Jan 14 18:20:13 2016].244971 msFreeMap(): freeing map at 0x15256f0. [Thu Jan 14 18:20:13 2016].244994 freeLayer(): freeing layer at 0x152d120. [Thu Jan 14 18:20:13 2016].245030 shp2img total time: 10.720s -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] kml superoverlays
On 2016-01-14 6:55 PM, Even Rouault wrote: Le jeudi 14 janvier 2016 23:21:30, Jeff McKenna a écrit : On 2016-01-14 4:51 PM, Even Rouault wrote: Could this 'OGRDB2DriverOpen' be the issue? This is just a harmelss debug message (that shouldn't be printed IMHO in the Open() method of the DB2 driver. cc'ing David) Shouldn't GDAL use the "KMLSUPEROVERLAY" driver here? (for the record that driver is listed in both my Windows and Ubuntu builds, through 'gdalinfo --formats'). No the issue is that the \ windows directory separator was used instead of / for http ressources. Just fixed with https://trac.osgeo.org/gdal/ticket/6310 You might get some extra open speedup by defining GDAL_DISABLE_READDIR_ON_OPEN=EMPTY as env. var/config. option (this prevents probing for (most) side-car files. This is not something to use in general however. Thanks Even, that worked! Now onto MapServer :) Unfortunately that same vsicurl superoverlay in MapServer-master works on Ubuntu, but now on Windows. Here is more details: Hum I didn't try with MapServer, but looking at the GDAL request it does in the logs, I tried something close with gdal_translate: gdal_translate /vsicurl/http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml out2.tif -outsize 312 300 and the good or bad news is that fails on both Ubuntu and Windows (well at least on wine/Linux) with a similar error to yours: VSICURL: Start download for http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-070501/422.kml VSICURL: Stop download for http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-070501/422.kml VSICURL: Start download for http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-070501/422.JPEG VSICURL: Stop download for http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-070501/422.JPEG GDAL: GDALOpen(/vsimem/kmlsuperoverlay/6_0x1d0f878, this=0x1d12bd0) succeeds as JPEG. GDAL: GDALDefaultOverviews::OverviewScan() GDAL: GDALDefaultOverviews::OverviewScan() ERROR 5: /vsimem/kmlsuperoverlay/3_0x1cf4ce8, band 1: Illegal nBlockXOff value (2) in GDALRasterBand::TryGetLockedBlockRef() ERROR 5: /vsimem/kmlsuperoverlay/3_0x1cf4ce8, band 1: Illegal nBlockXOff value (2) in GDALRasterBand::GetLockedBlockRef() Not sure why you get different results. Mind opening a GDAL ticket about that ? I'm debugging something else tricky right now ;-) no problem, willdo, I know the feeling :) -jeff Mapfile === MAP NAME "superoverlay" STATUS ON SIZE 400 300 EXTENT -122.1293127 37.3727086 -122.0593424 37.4398034 UNITS DD IMAGECOLOR 255 255 255 LAYER NAME "mountain-view-superoverlay" TYPE RASTER STATUS ON #DATA "mv-doqq.kml" DATA "/vsicurl/http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml; CLASS NAME "Superoverlay" STYLE END END END # layer END # Map File Test1: MapServer with superoverlay+VSICURL, on Windows == shp2img -m superoverlay-kml.map -o ttt.png -all_debug 5 result (fail) - msLoadMap(): 0.000s msDrawMap(): rendering using outputformat named png (AGG/PNG). msDrawMap(): WMS/WFS set-up and query, 0.000s msDrawRasterLayerLow(mountain-view-superoverlay): entering. msDrawRasterLayerGDAL(): Entering transform. msDrawRasterLayerGDAL(): src=0,0,16384,16384, dst=44,0,312,300 msDrawRasterLayerGDAL(): source raster PL (-4.888,-27.409) for dst PL (44,0). msDrawRasterLayerGDAL(): red,green,blue,alpha bands = 1,2,3,4 drawGDAL(): Unable to access file. GDALDatasetRasterIO() failed: /vsimem/kmlsuperoverlay/3 _085CA378, band 1: Illegal nBlockXOff value (2) in GDALRasterBand::GetLockedBlockRef() msDrawMap(): Image handling error. Failed to draw layer named 'mountain-view-superoverlay' . msDrawMap(): Image handling error. Failed to draw layer named 'mountain-view-superoverlay' . drawGDAL(): Unable to access file. GDALDatasetRasterIO() failed: /vsimem/kmlsuperoverlay/3 _085CA378, band 1: Illegal nBlockXOff value (2) in GDALRasterBand::GetLockedBlockRef() msFreeMap(): freeing map at 061BA7F0. freeLayer(): freeing layer at 07273208. Test2: MapServer with superoverlay+VSICURL, on Ubuntu == $ shp2img -m superoverlay-kml.map -o ttt.png -all_debug 5 result (success) [Thu Jan 14 18:20:02 2016].525687 msLoadMap(): 0.000s [Thu Jan 14 18:20:02 2016].525906 msDrawMap(): rendering using outputformat named png (AGG/PNG). [Thu Jan 14 18:20:02 2016].525919 msDrawMap(): WMS/WFS set-up and query, 0.000s [Thu Jan 14 18:20:02 2016].527354 msDrawRasterLayerLow(mountain-view-superoverlay): entering. [Thu Jan 14 18:20:11 2016].774926 msDrawRasterLayerGDAL(): Entering transform. [Thu Jan 14 18:20:11 2016].774950 msDrawRasterLayerGDAL(): src=0,0,16384,16384, dst=44,0,312,300 [Thu Jan 14 18:20:11 2016].774955 msDrawRasterLayerGDAL(): source raster PL (-4.888,-27.409) for dst PL (44,0). [Thu Jan 14 18:20:11 2016].774969 msDrawRasterLayerGDAL():
Re: [mapserver-users] kml superoverlays
Le jeudi 14 janvier 2016 23:21:30, Jeff McKenna a écrit : > On 2016-01-14 4:51 PM, Even Rouault wrote: > >> Could this 'OGRDB2DriverOpen' be the issue? > > > > This is just a harmelss debug message (that shouldn't be printed IMHO in > > the Open() method of the DB2 driver. cc'ing David) > > > >> Shouldn't GDAL use the > >> "KMLSUPEROVERLAY" driver here? (for the record that driver is listed in > >> both my Windows and Ubuntu builds, through 'gdalinfo --formats'). > > > > No the issue is that the \ windows directory separator was used instead > > of / for http ressources. > > Just fixed with https://trac.osgeo.org/gdal/ticket/6310 > > > > You might get some extra open speedup by defining > > GDAL_DISABLE_READDIR_ON_OPEN=EMPTY as env. var/config. option (this > > prevents probing for (most) side-car files. This is not something to use > > in general however. > > Thanks Even, that worked! > > Now onto MapServer :) Unfortunately that same vsicurl superoverlay in > MapServer-master works on Ubuntu, but now on Windows. Here is more > details: Hum I didn't try with MapServer, but looking at the GDAL request it does in the logs, I tried something close with gdal_translate: gdal_translate /vsicurl/http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml out2.tif -outsize 312 300 and the good or bad news is that fails on both Ubuntu and Windows (well at least on wine/Linux) with a similar error to yours: VSICURL: Start download for http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-070501/422.kml VSICURL: Stop download for http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-070501/422.kml VSICURL: Start download for http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-070501/422.JPEG VSICURL: Stop download for http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-070501/422.JPEG GDAL: GDALOpen(/vsimem/kmlsuperoverlay/6_0x1d0f878, this=0x1d12bd0) succeeds as JPEG. GDAL: GDALDefaultOverviews::OverviewScan() GDAL: GDALDefaultOverviews::OverviewScan() ERROR 5: /vsimem/kmlsuperoverlay/3_0x1cf4ce8, band 1: Illegal nBlockXOff value (2) in GDALRasterBand::TryGetLockedBlockRef() ERROR 5: /vsimem/kmlsuperoverlay/3_0x1cf4ce8, band 1: Illegal nBlockXOff value (2) in GDALRasterBand::GetLockedBlockRef() Not sure why you get different results. Mind opening a GDAL ticket about that ? I'm debugging something else tricky right now ;-) > > Mapfile > === > > MAP > NAME "superoverlay" > STATUS ON > SIZE 400 300 > EXTENT -122.1293127 37.3727086 -122.0593424 37.4398034 > UNITS DD > IMAGECOLOR 255 255 255 > > LAYER >NAME "mountain-view-superoverlay" >TYPE RASTER >STATUS ON >#DATA "mv-doqq.kml" >DATA > "/vsicurl/http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml; >CLASS > NAME "Superoverlay" > STYLE > END >END > END # layer > > END # Map File > > Test1: MapServer with superoverlay+VSICURL, on Windows > == > > shp2img -m superoverlay-kml.map -o ttt.png -all_debug 5 > > result (fail) > - > > msLoadMap(): 0.000s > msDrawMap(): rendering using outputformat named png (AGG/PNG). > msDrawMap(): WMS/WFS set-up and query, 0.000s > msDrawRasterLayerLow(mountain-view-superoverlay): entering. > msDrawRasterLayerGDAL(): Entering transform. > msDrawRasterLayerGDAL(): src=0,0,16384,16384, dst=44,0,312,300 > msDrawRasterLayerGDAL(): source raster PL (-4.888,-27.409) for dst PL > (44,0). > msDrawRasterLayerGDAL(): red,green,blue,alpha bands = 1,2,3,4 > drawGDAL(): Unable to access file. GDALDatasetRasterIO() failed: > /vsimem/kmlsuperoverlay/3 > _085CA378, band 1: Illegal nBlockXOff value (2) in > GDALRasterBand::GetLockedBlockRef() > > msDrawMap(): Image handling error. Failed to draw layer named > 'mountain-view-superoverlay' > . > msDrawMap(): Image handling error. Failed to draw layer named > 'mountain-view-superoverlay' > . > drawGDAL(): Unable to access file. GDALDatasetRasterIO() failed: > /vsimem/kmlsuperoverlay/3 > _085CA378, band 1: Illegal nBlockXOff value (2) in > GDALRasterBand::GetLockedBlockRef() > > msFreeMap(): freeing map at 061BA7F0. > freeLayer(): freeing layer at 07273208. > > Test2: MapServer with superoverlay+VSICURL, on Ubuntu > == > > $ shp2img -m superoverlay-kml.map -o ttt.png -all_debug 5 > > result (success) > > > [Thu Jan 14 18:20:02 2016].525687 msLoadMap(): 0.000s > [Thu Jan 14 18:20:02 2016].525906 msDrawMap(): rendering using > outputformat named png (AGG/PNG). > [Thu Jan 14 18:20:02 2016].525919 msDrawMap(): WMS/WFS set-up and query, > 0.000s > [Thu Jan 14 18:20:02 2016].527354 > msDrawRasterLayerLow(mountain-view-superoverlay): entering. > [Thu Jan 14 18:20:11 2016].774926 msDrawRasterLayerGDAL(): Entering > transform. > [Thu Jan 14 18:20:11 2016].774950 msDrawRasterLayerGDAL(): > src=0,0,16384,16384, dst=44,0,312,300 > [Thu Jan 14 18:20:11 2016].774955
Re: [mapserver-users] kml superoverlays
On 2016-01-14 6:55 PM, Even Rouault wrote: Hum I didn't try with MapServer, but looking at the GDAL request it does in the logs, I tried something close with gdal_translate: gdal_translate /vsicurl/http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml out2.tif -outsize 312 300 and the good or bad news is that fails on both Ubuntu and Windows (well at least on wine/Linux) with a similar error to yours: VSICURL: Start download for http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-070501/422.kml VSICURL: Stop download for http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-070501/422.kml VSICURL: Start download for http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-070501/422.JPEG VSICURL: Stop download for http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-070501/422.JPEG GDAL: GDALOpen(/vsimem/kmlsuperoverlay/6_0x1d0f878, this=0x1d12bd0) succeeds as JPEG. GDAL: GDALDefaultOverviews::OverviewScan() GDAL: GDALDefaultOverviews::OverviewScan() ERROR 5: /vsimem/kmlsuperoverlay/3_0x1cf4ce8, band 1: Illegal nBlockXOff value (2) in GDALRasterBand::TryGetLockedBlockRef() ERROR 5: /vsimem/kmlsuperoverlay/3_0x1cf4ce8, band 1: Illegal nBlockXOff value (2) in GDALRasterBand::GetLockedBlockRef() Not sure why you get different results. Mind opening a GDAL ticket about that ? I'm debugging something else tricky right now ;-) GDAL ticket: https://trac.osgeo.org/gdal/ticket/6311 -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] kml superoverlays
> Could this 'OGRDB2DriverOpen' be the issue? This is just a harmelss debug message (that shouldn't be printed IMHO in the Open() method of the DB2 driver. cc'ing David) > Shouldn't GDAL use the > "KMLSUPEROVERLAY" driver here? (for the record that driver is listed in > both my Windows and Ubuntu builds, through 'gdalinfo --formats'). No the issue is that the \ windows directory separator was used instead of / for http ressources. Just fixed with https://trac.osgeo.org/gdal/ticket/6310 You might get some extra open speedup by defining GDAL_DISABLE_READDIR_ON_OPEN=EMPTY as env. var/config. option (this prevents probing for (most) side-car files. This is not something to use in general however. -- Spatialys - Geospatial professional services http://www.spatialys.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] kml superoverlays
On 2016-01-13 1:20 PM, Even Rouault wrote: Le mercredi 13 janvier 2016 17:59:46, Páll Péter Hunor a écrit : Hi, Thanks for tip, I already have seen that option, but I have not found any example how to use it. Does anybody have any experience with that? You can refer to general raster input documentation : http://mapserver.org/input/raster.html Check first with gdalinfo that the KML superoverlay is properly recognized. If that works, you should also be able to open it in a desktop GIS such as QGIS. Hunor On 2016.01.13. 17:32, Even Rouault wrote: Le mercredi 13 janvier 2016 17:15:12, Páll Péter Hunor a écrit : Hi, Does mapserver support raster layers using kml superoverlays as data source, similar to shapefile based tileindexes? I did not find any solution, but I still might exist... Thanks in advance. GDAL supports opening kml superoverlays file as rasters (probably with some caveats), so you can try adding DATA your.kml or your.kmz in the mapfile. (no docs apart mentionning it in http://gdal.org/formats_list.html ) Regards, Hunor This caught my interest yesterday, so I did some testing locally with a KML superoverlay. I used the file referenced in the KML reference doc: http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml What I found was that I have troubles getting GDAL to read this file on Windows, yet no problems with Ubuntu. I compile GDAL from source for both Windows and Ubuntu. To be honest, at first I thought the issue must be because on Windows I was using GDAL 2.0.1, and on Ubuntu I am using GDAL-trunk; but today I did a fresh build of GDAL-trunk on Windows, and the same problem exists. I'm sharing this because I am stuck on why this occurs. Here is more details: Test 1: VSICURL to a remote GeoTIFF, on Windows === gdalinfo /vsicurl/http://svn.osgeo.org/gdal/trunk/autotest/utilties/data/pyramid_shaded_ref.tif result: expected details on the tif extents etc. Test 2: VSICURL to the remote KML Superoverlay, on Windows == gdalinfo /vsicurl/http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml gdalinfo failed - unable to open '/vsicurl/http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml'. Test 3: VSICURL to the remote KML Superoverlay, on Windows, with debug == gdalinfo --config CPL_DEBUG ON /vsicurl/http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml VSICURL: GetFileSize(http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml)=0 r esponse_code=200 VSICURL: GetFileList(/vsicurl/http://mw1.google.com/mw-earth-vectordb/kml-samples) VSICURL: Downloading 0-18446744073709551615 (http://mw1.google.com/mw-earth-vectordb/kml-s amples/mv-doqq.kml)... VSICURL: Got response_code=206 VSICURL: GetFileSize(http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.hdr)=0 r esponse_code=404 VSICURL: GetFileSize(http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.HDR)=0 r esponse_code=404 VSICURL: GetFileSize(http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml.hdr)= 0 response_code=404 VSICURL: GetFileSize(http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml.HDR)= 0 response_code=404 VSICURL: GetFileSize(http://mw1.google.com/mw-earth-vectordb/kml-samples/MV-DOQQ.HDR)=0 r esponse_code=404 VSICURL: GetFileSize(http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.aux)=0 r esponse_code=404 VSICURL: GetFileSize(http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.AUX)=0 r esponse_code=404 VSICURL: GetFileSize(http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml.xml)= 0 response_code=404 VSICURL: Start download for http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-070501/ 1.kml VSICURL: Stop download for http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-070501/1 .kml VSICURL: Start download for http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-070501\ 1.JPEG VSICURL: Stop download for http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-070501\1 .JPEG OGRDB2DriverOpen: pszFilename: '/vsicurl/http://mw1.google.com/mw-earth-vectordb/kml-sampl es/mv-doqq.kml' gdalinfo failed - unable to open '/vsicurl/http://mw1.google.com/mw-earth-vectordb/kml-sam ples/mv-doqq.kml'. Test 4: VSICURL to the remote KML Superoverlay, on Ubuntu, with debug = $ gdalinfo --config CPL_DEBUG ON /vsicurl/http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml VSICURL: GetFileSize(http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml)=0 response_code=200 VSICURL: GetFileList(/vsicurl/http://mw1.google.com/mw-earth-vectordb/kml-samples) VSICURL: Downloading 0-18446744073709551615 (http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml)... VSICURL: Got
Re: [mapserver-users] kml superoverlays
On 2016-01-14 4:22 PM, Jeff McKenna wrote: On 2016-01-13 1:20 PM, Even Rouault wrote: Le mercredi 13 janvier 2016 17:59:46, Páll Péter Hunor a écrit : Hi, Thanks for tip, I already have seen that option, but I have not found any example how to use it. Does anybody have any experience with that? You can refer to general raster input documentation : http://mapserver.org/input/raster.html Check first with gdalinfo that the KML superoverlay is properly recognized. If that works, you should also be able to open it in a desktop GIS such as QGIS. Hunor On 2016.01.13. 17:32, Even Rouault wrote: Le mercredi 13 janvier 2016 17:15:12, Páll Péter Hunor a écrit : Hi, Does mapserver support raster layers using kml superoverlays as data source, similar to shapefile based tileindexes? I did not find any solution, but I still might exist... Thanks in advance. GDAL supports opening kml superoverlays file as rasters (probably with some caveats), so you can try adding DATA your.kml or your.kmz in the mapfile. (no docs apart mentionning it in http://gdal.org/formats_list.html ) Regards, Hunor This caught my interest yesterday, so I did some testing locally with a KML superoverlay. I used the file referenced in the KML reference doc: http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml What I found was that I have troubles getting GDAL to read this file on Windows, yet no problems with Ubuntu. I compile GDAL from source for both Windows and Ubuntu. To be honest, at first I thought the issue must be because on Windows I was using GDAL 2.0.1, and on Ubuntu I am using GDAL-trunk; but today I did a fresh build of GDAL-trunk on Windows, and the same problem exists. I'm sharing this because I am stuck on why this occurs. Here is more details: Test 1: VSICURL to a remote GeoTIFF, on Windows === gdalinfo /vsicurl/http://svn.osgeo.org/gdal/trunk/autotest/utilties/data/pyramid_shaded_ref.tif result: expected details on the tif extents etc. Test 2: VSICURL to the remote KML Superoverlay, on Windows == gdalinfo /vsicurl/http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml gdalinfo failed - unable to open '/vsicurl/http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml'. Test 3: VSICURL to the remote KML Superoverlay, on Windows, with debug == gdalinfo --config CPL_DEBUG ON /vsicurl/http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml VSICURL: GetFileSize(http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml)=0 r esponse_code=200 VSICURL: GetFileList(/vsicurl/http://mw1.google.com/mw-earth-vectordb/kml-samples) VSICURL: Downloading 0-18446744073709551615 (http://mw1.google.com/mw-earth-vectordb/kml-s amples/mv-doqq.kml)... VSICURL: Got response_code=206 VSICURL: GetFileSize(http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.hdr)=0 r esponse_code=404 VSICURL: GetFileSize(http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.HDR)=0 r esponse_code=404 VSICURL: GetFileSize(http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml.hdr)= 0 response_code=404 VSICURL: GetFileSize(http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml.HDR)= 0 response_code=404 VSICURL: GetFileSize(http://mw1.google.com/mw-earth-vectordb/kml-samples/MV-DOQQ.HDR)=0 r esponse_code=404 VSICURL: GetFileSize(http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.aux)=0 r esponse_code=404 VSICURL: GetFileSize(http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.AUX)=0 r esponse_code=404 VSICURL: GetFileSize(http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml.xml)= 0 response_code=404 VSICURL: Start download for http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-070501/ 1.kml VSICURL: Stop download for http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-070501/1 .kml VSICURL: Start download for http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-070501\ 1.JPEG VSICURL: Stop download for http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-070501\1 .JPEG OGRDB2DriverOpen: pszFilename: '/vsicurl/http://mw1.google.com/mw-earth-vectordb/kml-sampl es/mv-doqq.kml' Could this 'OGRDB2DriverOpen' be the issue? Shouldn't GDAL use the "KMLSUPEROVERLAY" driver here? (for the record that driver is listed in both my Windows and Ubuntu builds, through 'gdalinfo --formats'). gdalinfo failed - unable to open '/vsicurl/http://mw1.google.com/mw-earth-vectordb/kml-sam ples/mv-doqq.kml'. Test 4: VSICURL to the remote KML Superoverlay, on Ubuntu, with debug = $ gdalinfo --config CPL_DEBUG ON /vsicurl/http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml VSICURL: GetFileSize(http://mw1.google.com/mw-earth-vectordb/kml-samples/mv-doqq.kml)=0 response_code=200 VSICURL:
Re: [mapserver-users] kml superoverlays
Hi, Thanks for tip, I already have seen that option, but I have not found any example how to use it. Does anybody have any experience with that? Hunor On 2016.01.13. 17:32, Even Rouault wrote: Le mercredi 13 janvier 2016 17:15:12, Páll Péter Hunor a écrit : Hi, Does mapserver support raster layers using kml superoverlays as data source, similar to shapefile based tileindexes? I did not find any solution, but I still might exist... Thanks in advance. GDAL supports opening kml superoverlays file as rasters (probably with some caveats), so you can try adding DATA your.kml or your.kmz in the mapfile. (no docs apart mentionning it in http://gdal.org/formats_list.html ) Regards, Hunor -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] kml superoverlays
Le mercredi 13 janvier 2016 17:15:12, Páll Péter Hunor a écrit : > Hi, > > Does mapserver support raster layers using kml superoverlays as data > source, similar to shapefile based tileindexes? > I did not find any solution, but I still might exist... > Thanks in advance. GDAL supports opening kml superoverlays file as rasters (probably with some caveats), so you can try adding DATA your.kml or your.kmz in the mapfile. (no docs apart mentionning it in http://gdal.org/formats_list.html ) > > Regards, > Hunor -- Spatialys - Geospatial professional services http://www.spatialys.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] kml superoverlays
Le mercredi 13 janvier 2016 17:59:46, Páll Péter Hunor a écrit : > Hi, > > Thanks for tip, I already have seen that option, but I have not found > any example how to use it. > Does anybody have any experience with that? You can refer to general raster input documentation : http://mapserver.org/input/raster.html Check first with gdalinfo that the KML superoverlay is properly recognized. If that works, you should also be able to open it in a desktop GIS such as QGIS. > > Hunor > > On 2016.01.13. 17:32, Even Rouault wrote: > > Le mercredi 13 janvier 2016 17:15:12, Páll Péter Hunor a écrit : > >> Hi, > >> > >> Does mapserver support raster layers using kml superoverlays as data > >> source, similar to shapefile based tileindexes? > >> I did not find any solution, but I still might exist... > >> Thanks in advance. > > > > GDAL supports opening kml superoverlays file as rasters (probably with > > some caveats), so you can try adding DATA your.kml or your.kmz in the > > mapfile. > > > > (no docs apart mentionning it in > > http://gdal.org/formats_list.html ) > > > >> Regards, > >> Hunor -- Spatialys - Geospatial professional services http://www.spatialys.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users