[gdal-dev] Changing layer name of GeoJSON datasets

Sean Gillies sean at mapbox.com
Sun Nov 20 00:43:19 PST 2016


Hi Even,

All the above (or below) sounds good to me. Could a "description" member be
added as well?

On Sat, Nov 19, 2016 at 4:24 PM, Even Rouault <even.rouault at spatialys.com>
wrote:

> Hi
>
> Currently the GeoJSON datasource always return "OGRGeoJSON" as a layer
> name,
> which is quite boring (if you convert the geojson into a multi-layer
> capable
> dataousrce, you always have to rename the layer to something more
> meaningful)
>
> I'd consider changing that to take the basename of the datasource, ie "my"
> if
> the filename is "/path/to/my.geojson". This would be similar to many other
> drivers like Shapefile, CSV, MapInfo File, JML ... (ie drivers with a
> single
> layer per file)
>
> For URLS coming from HTTP services with query parameters "?foo=bar&...", we
> would likely keep the "OGRGeoJSON" name.
>
> I'd also consider adding and reading a "name" extension member in the
> FeatureCollection object to store/retrieve the layer name. This would have
> the
> priority over the filename based rule when it exists.
>
> {
>         "type": "FeatureCollection",
>         "name": "layer_name",
>         "features": [
>         }
> }
>
> Thoughts ?
>
> Even
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev




-- 
Sean Gillies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20161120/84231546/attachment.html>


More information about the gdal-dev mailing list