[mapserver-users] Mapserver 7.6.1 - PHP 7 Swig - Kml output issue

Bruno Domenget bruno.domenget.roch at gmail.com
Thu Oct 15 09:23:40 PDT 2020


Hi Jeff,

Thanks for taking the time to investigate that !

That is what I feared, but it is not such a big deal as we can still use
csv export and write our own KML creation function.

It would have been much worse if the issue had been about Shapefile export.

I will create the ticket as soon as possible.

Thanks and hello from Quebec !

Bruno

Le jeu. 15 oct. 2020 à 12:01, Jeff McKenna <jmckenna at gatewaygeomatics.com>
a écrit :

> Bruno: since you get all the credit for this research, can you please
> file this as a ticket at : https://github.com/MapServer/MapServer/issues
>   (include your mapfile and commands, nothing about mapscript).  I
> believe this is something to do with how inline features are handled,
> for labels, in KML output.  (maybe related to the message
> "msINLINELayerOpen: Layer is already open!" that MapServer is yelling at
> us, ha)
>
> Thanks and hello from the east coast of Canada,
>
> -jeff
>
>
> --
> Jeff McKenna
> MapServer Consulting and Training Services
> co-founder of FOSS4G
> http://gatewaygeo.com/
>
>
>
>
>
> On 2020-10-15 10:58 a.m., Bruno Domenget wrote:
> > Sorry I should have said at first that I already checked that. I have
> > both KML and LIBKML drivers listed.
> >
> > And KML output works if I remove the LABEL entry from my mapfile...
> >
> > Le jeu. 15 oct. 2020 à 09:52, Jeff McKenna
> > <jmckenna at gatewaygeomatics.com <mailto:jmckenna at gatewaygeomatics.com>>
> a
> > écrit :
> >
> >     Hi Bruno,
> >
> >     Next test is to test that your local GDAL was built with KML support:
> >
> >         ogrinfo --formats
> >
> >     (you should see a 'LIBKML' or 'KML' driver listed there, either one
> can
> >     be used for this)
> >
> >     -jeff
> >
> >
> >
> >     --
> >     Jeff McKenna
> >     MapServer Consulting and Training Services
> >     co-founder of FOSS4G
> >     http://gatewaygeo.com/
> >
> >
> >     On 2020-10-15 10:48 a.m., Bruno Domenget wrote:
> >      > Hi Jeff,
> >      >
> >      > Thanks for your quick answer !
> >      >
> >      > So I tried with shp2img but got the same error with KML output...
> >      > *msDrawMap(): Image handling error. Failed to draw layer named
> >     'points'.
> >      > <br>
> >      > GDAL: In GDALDestroy - unloading GDAL shared library.*
> >      >
> >      > Logfile :
> >      > [Thu Oct 15 15:36:02 2020].174254 msLoadMap(): 0.005s
> >      > [Thu Oct 15 15:36:02 2020].174344 msDrawMap(): rendering using
> >      > outputformat named kml (KML).
> >      > [Thu Oct 15 15:36:02 2020].174348 msDrawMap(): WMS/WFS set-up and
> >     query,
> >      > 0.000s
> >      > [Thu Oct 15 15:36:02 2020].174369 msINLINELayerOpen: Layer is
> >     already open!
> >      > [Thu Oct 15 15:36:02 2020].174564
> >      >
> >     msSaveImage(/home/mapserver/public_html/test/././5f885042_26ab_0.png)
> >      > total time: 0.000s
> >      > [Thu Oct 15 15:36:02 2020].174629 msDrawMap(): Image handling
> error.
> >      > Failed to draw layer named 'points'.
> >      > [Thu Oct 15 15:36:02 2020].174649 msFreeMap(): freeing map at
> >      > 0x559913f1af60.
> >      > [Thu Oct 15 15:36:02 2020].174698 freeLayer(): freeing layer at
> >      > 0x559914207ad0.
> >      >
> >      > It works perfectly with PNG output, and with KML output if I
> >     remove the
> >      > LABEL lines from my mapfile.
> >      >
> >      > So it is not a Mapscript issue, there is definitely an issue with
> my
> >      > Mapserver instance...
> >      >
> >      > Bruno
> >      >
> >      >
> >      >
> >      > Le jeu. 15 oct. 2020 à 08:42, Jeff McKenna
> >      > <jmckenna at gatewaygeomatics.com
> >     <mailto:jmckenna at gatewaygeomatics.com>
> >     <mailto:jmckenna at gatewaygeomatics.com
> >     <mailto:jmckenna at gatewaygeomatics.com>>> a
> >      > écrit :
> >      >
> >      >     oops here is the correct command for kml output:
> >      >
> >      >         shp2img -m mymap.map -o ttt.kml -i kml -all_debug 5
> >      >
> >      >     (does that generate a valid KML file?)
> >      >
> >      >
> >      >     -jeff
> >      >
> >      >
> >      >
> >      >     --
> >      >     Jeff McKenna
> >      >     MapServer Consulting and Training Services
> >      >     co-founder of FOSS4G
> >      > http://gatewaygeo.com/
> >      >
> >      >
> >      >     On 2020-10-15 9:41 a.m., Jeff McKenna wrote:
> >      >      > Hi Bruno,
> >      >      >
> >      >      > What happens if you call that mapfile at the commandline
> with
> >      >     shp2img
> >      >      > (and pass the "i" switch with your format name)?  such as:
> >      >      >
> >      >      >    shp2img -m mymap.map -o ttt.png -i kml -all_debug 5
> >      >      >
> >      >      > You can also then try png output:
> >      >      >
> >      >      >    shp2img -m mymap.map -o ttt.png -i png -all_debug 5
> >      >      >
> >      >      > Does it generate a valid map image?
> >      >      >
> >      >      >
> >      >      >
> >      >      >
> >      >      > -jeff
> >      >      >
> >      >      >
> >      >      >
> >      >
> >      >     _______________________________________________
> >      >     mapserver-users mailing list
> >      > mapserver-users at lists.osgeo.org
> >     <mailto:mapserver-users at lists.osgeo.org>
> >     <mailto:mapserver-users at lists.osgeo.org
> >     <mailto:mapserver-users at lists.osgeo.org>>
> >      > https://lists.osgeo.org/mailman/listinfo/mapserver-users
> >      >
> >      >
> >      > _______________________________________________
> >      > mapserver-users mailing list
> >      > mapserver-users at lists.osgeo.org
> >     <mailto:mapserver-users at lists.osgeo.org>
> >      > https://lists.osgeo.org/mailman/listinfo/mapserver-users
> >      >
> >
> >     _______________________________________________
> >     mapserver-users mailing list
> >     mapserver-users at lists.osgeo.org <mailto:
> mapserver-users at lists.osgeo.org>
> >     https://lists.osgeo.org/mailman/listinfo/mapserver-users
> >
> >
> > _______________________________________________
> > mapserver-users mailing list
> > mapserver-users at lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/mapserver-users
> >
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20201015/e32e26a9/attachment.html>


More information about the mapserver-users mailing list