[Geojson] Representation of empty

Arlo Belshee Arlo.Belshee at microsoft.com
Tue Jun 28 15:33:32 PDT 2011


I have a question. Looking through the archive, I found a related discussion in 2007. However, it doesn't quite apply to my situation, so I wanted to see what the community recommends.

First, some background. I'm working on adding spatial data support to the OData standard (http://odata.org). OData exposes strongly-modeled data. We're adding support for geospatial data types as primitives. We're using the OGC SF types, minus Feature & FeatureCollection. We've got our Entity data modeling stuff to do everything features were designed for and more.

The question: given that, how do I represent on OGC EMPTY value in GeoJSON?

Example (without EMPTY):

{ "d" : {
    "results": [
      {
        "__metadata": {
            "uri": "http://services.odata.org/Foursquare.svc/Users('Neco447')",
          "type": "Foursquare.User"
        },
        "ID": "Neco447",
        "Name": "Neco Fogworthy",
        "FavoriteLocation": {
            "type": "Point",
          "coordinates": [-127.892345987345, 45.598345897]
        },
        "LastKnownLocation": {
          "type": "Point",
          "coordinates": [-127.892345987345, 45.598345897],
          "crs": {
              "type": "name",
              "properties": {
                  "name": "EPSG:4326"
              }
          },
          "bbox": [-180.0, -90.0, 180.0, 90.0]
        }
      },
      { /* another User Entry */ }
  ],
  "__count": "2",
} }

So, what do I do if the value of LastKnownLocation is the one the is written in OGC WKT as "Point EMPTY"? And similarly, what would I do for the corresponding value to "MultiPolygon EMPTY"? I do want to maintain the type distinction - these values do have different meaning. And, of course, the most fun one: "MultiLineString(EMPTY, (1 2,3 4), EMPTY)". Yes, I know that last one doesn't mean anything different than the LineString would, but such twisted values can show up in our users' data.

Assume that all these examples are in some planar coordinate system, so there's no confusion about mapping order of lat/long.

Given that, my supposition would be to represent these as:

{
  "type": "Point",
  "coordinates": null
}

{
  "type": "MultiPolygon",
  "coordinates": null
}

{
  "type": "MultiLineString",
  "coordinates": [null, [[1, 2], [3, 4]], null]
}

Does this match the expectations among the GeoJSON community?

Thanks for your help.

Arlo

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geojson.org/pipermail/geojson-geojson.org/attachments/20110628/9f573c98/attachment.htm>


More information about the GeoJSON mailing list