<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">First, some background. I’m working on adding spatial data support to the OData standard (<a href="http://odata.org">http://odata.org</a>). 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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The question: given that, how do I represent on OGC EMPTY value in GeoJSON?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Example (without EMPTY):<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">{ "d" : {<o:p></o:p></p>
<p class="MsoNormal">    "results": [<o:p></o:p></p>
<p class="MsoNormal">      {<o:p></o:p></p>
<p class="MsoNormal">        "__metadata": {  <o:p></o:p></p>
<p class="MsoNormal">            "uri": "<a href="http://services.odata.org/Foursquare.svc/Users('Neco447')">http://services.odata.org/Foursquare.svc/Users('Neco447')</a>", 
<o:p></o:p></p>
<p class="MsoNormal">          "type": "Foursquare.User"<o:p></o:p></p>
<p class="MsoNormal">        },<o:p></o:p></p>
<p class="MsoNormal">        "ID": "Neco447",<o:p></o:p></p>
<p class="MsoNormal">        "Name": "Neco Fogworthy",<o:p></o:p></p>
<p class="MsoNormal">        "FavoriteLocation": {<o:p></o:p></p>
<p class="MsoNormal">            "type": "Point",<o:p></o:p></p>
<p class="MsoNormal">          "coordinates": [-127.892345987345, 45.598345897]<o:p></o:p></p>
<p class="MsoNormal">        },<o:p></o:p></p>
<p class="MsoNormal">        "LastKnownLocation": {<o:p></o:p></p>
<p class="MsoNormal">          "type": "Point",<o:p></o:p></p>
<p class="MsoNormal">          "coordinates": [-127.892345987345, 45.598345897],<o:p></o:p></p>
<p class="MsoNormal">          "crs": {<o:p></o:p></p>
<p class="MsoNormal">              "type": "name",<o:p></o:p></p>
<p class="MsoNormal">              "properties": {<o:p></o:p></p>
<p class="MsoNormal">                  "name": "EPSG:4326"<o:p></o:p></p>
<p class="MsoNormal">              }<o:p></o:p></p>
<p class="MsoNormal">          },<o:p></o:p></p>
<p class="MsoNormal">          "bbox": [-180.0, -90.0, 180.0, 90.0]<o:p></o:p></p>
<p class="MsoNormal">        }<o:p></o:p></p>
<p class="MsoNormal">      },  <o:p></o:p></p>
<p class="MsoNormal">      { /* another User Entry */ }<o:p></o:p></p>
<p class="MsoNormal">  ],<o:p></o:p></p>
<p class="MsoNormal">  "__count": "2",<o:p></o:p></p>
<p class="MsoNormal">} }<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Assume that all these examples are in some planar coordinate system, so there’s no confusion about mapping order of lat/long.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Given that, my supposition would be to represent these as:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">{<o:p></o:p></p>
<p class="MsoNormal">  "type": "Point",<o:p></o:p></p>
<p class="MsoNormal">  "coordinates": null<o:p></o:p></p>
<p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">{<o:p></o:p></p>
<p class="MsoNormal">  "type": "MultiPolygon",<o:p></o:p></p>
<p class="MsoNormal">  "coordinates": null<o:p></o:p></p>
<p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">{<o:p></o:p></p>
<p class="MsoNormal">  "type": "MultiLineString",<o:p></o:p></p>
<p class="MsoNormal">  "coordinates": [null, [[1, 2], [3, 4]], null]<o:p></o:p></p>
<p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Does this match the expectations among the GeoJSON community?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks for your help.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Arlo<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>