[OpenLayers-Dev] WKT support?
Tim Schaub
noreply at geocartic.com
Mon Mar 26 12:07:06 EDT 2007
Hey-
John R. Frank wrote:
> Mostly out of curiousity, what, if any, support exists in the vector code
> for loading Well-Known Text? I mean strings like this:
>
> "POINT ( -71.060280 42.358330 )"
>
> "MULTIPOLYGON (((-70.82057189941406 42.87516784667969, ...
>
There is currently no WKT support in OpenLayers. It wouldn't be hard to
write an OpenLayers/Format/WKT.js that could read WKT and return a
geometry or take a geometry and write WKT.
>
> Also, tschaub: should GeoJSON use WKT?
>
This sort of gets away from the benefits of JSON - in particular the
ability to deserialize data structures into objects that are immediately
useful. If GeoJSON used WKT, something would still have to parse the
WKT string and make sense of it.
And, since I don't think GeoJSON has been mentioned here before, see
http://geojson.org if you're interested. My proposal for the format is
demonstrated here:
http://dev.openlayers.org/sandbox/tschaub/geojson/examples/geojson.html
Tim
More information about the Dev
mailing list