Given the following JSON document (with GeoJSON-compliant Point and
Polygon attributes):

 {"_id":"123", "location-point":{"type":"Point", "coordinates":[-10, 20]},
"location-poly":{"type":"Polygon", "coordinates":[[[-10, 20], [-10, 30],
[0, 20], [-10, 20]]]}}

 The default MarkLogic (7.0) XML representation of this document looks like
this:

 <?xml version="1.0" encoding="UTF-8"?>
<json type="object" xmlns="http://marklogic.com/xdmp/json/basic";>
<__id type="string">123</__id>
<location-point type="object">
<type type="string">Point</type>
<coordinates type="array">
<item type="number">-10</item>
<item type="number">20</item>
</coordinates>
</location-point>
<location-poly type="object">
<type type="string">Polygon</type>
<coordinates type="array">
<json type="array">
<json type="array">
<item type="number">-10</item>
<item type="number">20</item>
</json>
<json type="array">
<item type="number">-10</item>
<item type="number">30</item>
</json>
<json type="array">
<item type="number">0</item>
<item type="number">20</item>
</json>
<json type="array">
<item type="number">-10</item>
<item type="number">20</item>
</json>
</json>
</coordinates>
</location-poly>
</json>

Taking the simpler case of the Point, is there a MarkLogic geospatial
indexing strategy that will support this serialisation?
Element Pair Indexes would appear to require unique local names for lat and
lon, and Path Indexes would appear to require identification of a single
text node or attribute.
What approaches would people recommend to support geospatial search of
GeoJSON geometry types in MarkLogic?

Regards,
Nick
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to