<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style>
</head>
<body><div>Thanks Even!<br></div>
<div>I'll get a build together and test,<br></div>
<div><br></div>
<div>Seth</div>
<div><br></div>
<div id="sig62266145"><div class="signature">--<br></div>
<div class="signature">web:http://geographika.co.uk<br></div>
<div class="signature">twitter: @geographika<br></div>
</div>
<div><br></div>
<div><br></div>
<div>On Tue, Mar 6, 2018, at 11:41 AM, Even Rouault wrote:<br></div>
<blockquote type="cite"><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">Seth,<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;"> <br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">I've pushed a temptative fix per<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">https://github.com/mapserver/mapserver/commit/4e4885f8598764b7cfb3a8c1c91c6f60eb12671f<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">but I'm not completely positive this will fix what you've seen.<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;"> <br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">Even<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;"> <br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> Hi all,<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">><br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> I'm trying out the geopackage format as an alternative to shapefiles but<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> running into an issue where MapServer expects the geopackage dataset to<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> include spatialite. Drawing layers with shp2img logs the following:<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">><br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> [Tue Mar 06 10:39:42 2018].512000 msDrawMap(): rendering using outputformat<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> named png (AGG/PNG). [Tue Mar 06 10:39:42 2018].512000 msDrawMap(): WMS/WFS<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> set-up and query, 0.000s [Tue Mar 06 10:39:42 2018].529000 msOGRFileOpen:<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> Spatialite support in GPKG not enabled [Tue Mar 06 10:39:42 2018].549000<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> msOGRFileNextShape(): OGR error. OGR GetNextFeature() error'd. Check logs.<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> [Tue Mar 06 10:39:42 2018].549000 msOGRFileNextShape(): In ExecuteSQL():<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> sqlite3_prepare(SELECT spatialite_version()): no such function:<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> spatialite_version<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> [Tue Mar 06 10:39:42 2018].550000 msDrawMap(): Image handling error. Failed<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> to draw layer named 'ways'.<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">><br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> The spatialite_version function is missing in the geopackage. The dataset<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> was created by exporting from MapServer as an OUTPUTOPTION:<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">><br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">>       OUTPUTFORMAT<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">>         NAME "GeoPackage"<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">>         DRIVER "OGR/GPKG"<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">>         FORMATOPTION "STORAGE=memory"<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">>         FORMATOPTION "FORM=simple"<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">>         FORMATOPTION "FILENAME=result.gpkg"<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">>         FORMATOPTION "DSCO:SPATIALITE=YES" # not a listed option, but tried<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> anyway FORMATOPTION "LCO:SPATIAL_INDEX=YES"<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">>     END<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">><br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> Running a GisInternals build,  including GDAL 2.1.3 and MapServer 7.0.4.<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">><br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> Relevant code is at<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> https://github.com/mapserver/mapserver/blob/aae74ff2abed3f2f8fe1f76c9b4bbcc<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> f15023dc1/mapogr.cpp#L1313 It looks like the error should be swallowed up?<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">><br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> The same dataset exported directly to spatilite works fine.<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">><br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> Anyone experienced the above issue?<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">><br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> Regards,<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">><br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> Seth<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">><br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">><br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> --<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> web:http://geographika.co.uk<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> twitter: @geographika<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> _______________________________________________<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> mapserver-users mailing list<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> mapserver-users@lists.osgeo.org<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">> https://lists.osgeo.org/mailman/listinfo/mapserver-users<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;"> <br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;"> <br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">--<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">Spatialys - Geospatial professional services<br></p><p style="margin: 0px; text-indent: 0px; white-space: pre-wrap;">http://www.spatialys.com<br></p></blockquote><div><br></div>
</body>
</html>