[GeoJSON] A question about the spec

Martin Daly Martin.Daly at cadcorp.com
Fri Nov 15 09:16:49 PST 2013


Yes, that's fine, cf:

"2. GeoJSON Objects

GeoJSON always consists of a single object. This object (referred to as the GeoJSON object below) represents a geometry, feature, or collection of features.

o The GeoJSON object may have any number of members (name/value pairs)."

Martin

From: geojson-bounces at lists.geojson.org [mailto:geojson-bounces at lists.geojson.org] On Behalf Of Pearson, Eliot
Sent: 15 November 2013 17:15
To: geojson at lists.geojson.org
Subject: [GeoJSON] A question about the spec

Hello all,

My company is in the process creating location based services.  We have decided to create services that consume and produce GeoJSON documents.    I wonder if the following document adheres to the spec.  In the first feature, I wonder if the tag member is legitimate.  I know I could place it in properties, but I didn't know if I could make it an element.  I may have missed it in the spec, but I didn't see it.

{ "type": "FeatureCollection",
  "features": [
    { "type": "Feature",
      "tag" : "some tag",
      "geometry": {"type": "Point", "coordinates": [102.0, 0.5]},
      "properties": {"prop0": "value0"}
      },
    { "type": "Feature",
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]
          ]
        },
      "properties": {
        "prop0": "value0",
        "prop1": 0.0
        }
      },
    { "type": "Feature",
       "geometry": {
         "type": "Polygon",
         "coordinates": [
           [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0],
             [100.0, 1.0], [100.0, 0.0] ]
           ]
       },
       "properties": {
         "prop0": "value0",
         "prop1": {"this": "that"}
         }
       }
     ]
   }


Thanks,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geojson.org/pipermail/geojson-geojson.org/attachments/20131115/e14f28a0/attachment-0005.htm>


More information about the GeoJSON mailing list