Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features without location data #41

Open
docuracy opened this issue Feb 24, 2022 · 3 comments
Open

Features without location data #41

docuracy opened this issue Feb 24, 2022 · 3 comments
Labels
enhancement New feature or request JSON Schema

Comments

@docuracy
Copy link
Collaborator

LP standard at present requires coordinates within geometries. The GeoJSON standard allows for unlocated features but requires that they have null geometry.

PROPOSAL: Drop the requirement for coordinates to allow for standard GeoJSON representation of unlocated features. This will be useful not only for the validation of datasets where features have yet to be located, but also for datasets where location might be inappropriate (see this proposal).

@docuracy docuracy added enhancement New feature or request JSON Schema labels Feb 24, 2022
@kgeographer
Copy link
Contributor

The language in the spec is an interpretation of Section 3.1 of the GeoJSON spec. Open to other interpretations!

A GeoJSON Geometry object of any type other than "GeometryCollection" has a member with the name "coordinates". The value of the "coordinates" member is an array. The structure of the elements in this array is determined by the type of geometry. GeoJSON processors MAY interpret Geometry objects with empty "coordinates" arrays as null objects.

@rsimon
Copy link

rsimon commented Feb 25, 2022

Yes, I agree the spec isn't very clear here.... But I think the key fine print here is that the spec speaks about the geometry object.

We've been representing featuress without a geometry by giving them a geometry object, but with empty coordinates. That didn't work with our map/parsers. (I guess some parser MAY accept them, as the spec suggests. But not MapLibre, which is what we're using. I'm assuming MapBoxGL.js likely behaves the same.) The safe way - which is hinted here, but not very clearly - is to represent unlocated features as feature objects where the geometry is a null. That has worked for us in MapLibre.

@kgeographer
Copy link
Contributor

Just tested use of null for a geometry in a Leaflet L.geoJSON layer, and it also is fine -- simply not rendered. I am editing the LP spec accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request JSON Schema
Projects
None yet
Development

No branches or pull requests

3 participants