Questions tagged [geojson]

GeoJSON is a geospatial data interchange format based on JavaScript Object Notation (JSON)

GeoJSON is a geospatial data interchange format based on JavaScript Object Notation (JSON)

A GeoJSON object may represent a geometry, a feature, or a collection of features. GeoJSON supports the following geometry types: Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection. Features in GeoJSON contain a geometry object and additional properties, and a feature collection represents a list of features.

GeoJSON became an Internet Engineering Task Force (IETF) standard 7946 in 2016 replacing the previous version GeoJSON 2008.

The most notable change between the two versions of GeoJSON has been the removal of the the use of alternative coordinate reference systems ~ GeoJSON 2008 allowed alternative coordinate reference systems specified through the use of a crs member.

The GeoJSON 7946 specification now tells us that:

The coordinate reference system for all GeoJSON coordinates is a geographic coordinate reference system, using the World Geodetic System 1984 (WGS 84) [WGS84] datum, with longitude and latitude units of decimal degrees. This is equivalent to the coordinate reference system identified by the Open Geospatial Consortium (OGC) URN urn:ogc:def:crs:OGC::CRS84.

References:

2657 questions
38
votes
6 answers

Polygons and MultiPolygons should follow the right-hand rule

http://geojsonlint.com/ I get error Polygons and MultiPolygons should follow the right-hand rule I used it for past 3 years without any problem with my old GeoJSON file. Now geojsonlint enforce the right hand rule, how to fix the problem. Updated…
hoogw
  • 1,712
  • 1
  • 18
  • 23
24
votes
5 answers

Is it valid to have a properties element in an geoJSON featureCollection?

Is it valid to have a properties element with a featureCollection-element as parent? This is, according to geojson.org valid: { "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": {"type":…
stUrb
  • 2,269
  • 8
  • 24
  • 23
12
votes
2 answers

What are the default units of elevation/altitude/z in GeoJSON?

The GeoJSON spec says "The default CRS is a geographic coordinate reference system, using the WGS84 datum, and with longitude and latitude units of decimal degrees". It doesn't seem to specify what the units of elevation/altitude/z are for…
John Wiseman
  • 168
  • 1
  • 2
  • 10
10
votes
2 answers

Reverse polygons (left-hand to right-hand rule)

I have a geojson file that is not displaying correctly, and I believe it has to do with the file containing multipolygons not following the right-hand rule. What tool can to help me fix this problem? I've tried importing and exporting with QGIS, and…
leo
  • 801
  • 1
  • 7
  • 14
4
votes
2 answers

Can a GeoJSON GeometryCollection contain another Collection?

From a reading of the spec it seems that a GeometryCollection is a Geometry and can contain geometry objects? But I want to be sure that this is really allowed before I file a bug report.
Ian Turton
  • 81,417
  • 6
  • 84
  • 185
4
votes
1 answer

Including images in GeoJSON

Is there a correct way of including links to images within geoJSON? This is the FeatureCollection I have for an object on my site: { "type": "FeatureCollection", "features": [ { "id": 1234, "type": "Feature", "geometry": { …
Terence Eden
  • 143
  • 1
  • 5
4
votes
2 answers

How to include a GeoJSON FeatureCollection inside another FeatureCollection?

In the GeoJson spec 'An object of type "FeatureCollection" must have a member with the name "features". The value corresponding to "features" is an array. Each element in the array is a feature object as defined above.' I wish to include a…
intotecho
  • 902
  • 1
  • 9
  • 22
4
votes
2 answers

GeoJSON/GeoCouch questions from a newb

I am new to JSON and GeoJSON and would like to start to use this but I am a little confused about some things. Perhaps you can help me out: 1) Is there a GeoJSON validator out there? 2) Is the text below valid GeoJSON? To be a valid GeoJSON file do…
GuidoS
  • 1,174
  • 5
  • 16
  • 32
4
votes
1 answer

How can I dynamically add features to a GeoJSON file?

I have tons of pictures which I am showing in markers on a LeafletJs map and currently have a fixed GeoJSON file. So I want to know is there any easy way to dynamically add new features to the GeoJSON file? I was thinking a script(Php/JS) which…
somnium
  • 41
  • 1
  • 5
3
votes
1 answer

Can't display GeoJson on map

I've generate the GeoJson below, but I'm not able to display it on map, neither on http://geojson.io/. I'm pretty sure it depends from my GeoJson but i don't understand why. What am i doing wrong? { "features": [ { …
Davide Raro
  • 116
  • 8
3
votes
0 answers

Order of geometries in GeometryCollection

Does the order of geometries/features in GeometryCollection/FeatureCollection matter? There is a point in GeoJSON RFC (last point) about order but I could not get fully: The word "Collection" in "FeatureCollection" and "GeometryCollection" does not…
Gagan
  • 201
  • 2
  • 5
3
votes
0 answers

How widely supported are nested FeatureCollections in GeoJSON?

I know that FeatureCollections inside FeatureCollections are not supported according to the GeoJSON spec, but I have seen multiple implementations that do support it. Are nested feature collections widely supported, and how do implementations that…
Jesse Crocker
  • 1,389
  • 7
  • 13
3
votes
1 answer

Remove null attributes from GeoJSON

I used the following command to reproject a GeoJSON from lat/lon to 3857: ogr2ogr -f "GeoJSON" results_3857.json -t_srs "EPSG:3857" results.json Unexpectedly, the resulting file was 5 times larger than the original. Turns out the resulting file…
sfletche
  • 1,216
  • 1
  • 12
  • 24
2
votes
1 answer

When do GeoJSON feature collections need feature ids?

I've seen feature collections with feature ids for each feature. I've seen others with no featureid. When do you need it?
Kyle Pennell
  • 658
  • 3
  • 9
  • 17
2
votes
1 answer

Is there any valid way to include a Point feature in geoJSON if the coordinates are unknown?

The Point I'd like to include is a marking on a historical map. Most of the items on the map have been located, so they make valid geoJSON Points. A few locations can not be identified, but I'd like to include them in the geoJSON file for…
carpiediem
  • 161
  • 5
1
2 3