[mapserver-dev] Vector Tileindexes - do they need to be shapefiles
Even Rouault
even.rouault at spatialys.com
Wed Mar 22 10:23:31 PDT 2017
On mercredi 22 mars 2017 13:12:45 CET Michael Smith wrote:
> Devs,
>
> Currently raster tile indexes support multiple source types, ogr, db
> connections, etc. I just tried to do this with a vector tileindex and got
> that it has to be a shapefile. I see this in the code:
>
> if(tlp->connectiontype != MS_SHAPEFILE) {
> msSetError(MS_SHPERR, "Tileindex layer must be a shapefile.",
> "msTiledSHPOpenFile()");
> return(MS_FAILURE);
> }
>
> Do vector tileindexes only support shapefiles or is this just an old check
> that¹s never been removed?
Mike,
The check here is legitimate, and if you remove it, you'll likely get a crash as few lines
because of the cast :
tSHP->tileshpfile = (shapefileObj *) tlp->layerinfo; /* shapefiles use layerinfo to point to a
shapefileObj */
But you can accomplish what you want by adding a CONNECTIONTYPE OGR item in your
layer definition. This will go through the OGR code path which also supports tile indexes ...
provided they are OGR datasources themselves.
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20170322/bd64ffea/attachment.html>
More information about the mapserver-dev
mailing list