[gdal-dev] Changing layer name of GeoJSON datasets

Even Rouault even.rouault at spatialys.com
Sun Nov 20 09:26:18 PST 2016


On dimanche 20 novembre 2016 09:43:19 CET Sean Gillies wrote:
> Hi Even,
> 
> All the above (or below) sounds good to me. Could a "description" member be
> added as well?

Yes. Implemented per https://trac.osgeo.org/gdal/changeset/36339

> 
> 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


-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list