Marking Out Features Using Virtual Earth
Spatial data presented in text- or binary-based formats can be hard to visualise - it is much more natural to describe places on the earth by pointing them out on a map.
In this chapter, I demonstrate a technique that you can use to build your own small web application that uses the Microsoft Virtual Earth service as a 'drawing canvas' - an interface on which you can pinpoint locations, or trace the outlines of features. Using a few lines of JavaScript code, you can then take the shapes drawn on the map and convert them into WKT format, which you can use in SQL Server to define shapes using SRID 4326 with the
UPDATED 21/04/2009 The script on this page now accounts for projection depending on whether you choose to create an item of geometry or geography data. Tip: If you want to create an item of geometry data, choose 2d mode. If you want to create an item of geography data, try 3d mode. This will demonstrate how geography Linestrings represent the shortest path between two points on a round-earth, while the geometry datatype represents the shortest straight route between two points on a flat map.
STGeomFromText() method.
UPDATED 21/04/2009 The script on this page now accounts for projection depending on whether you choose to create an item of geometry or geography data. Tip: If you want to create an item of geometry data, choose 2d mode. If you want to create an item of geography data, try 3d mode. This will demonstrate how geography Linestrings represent the shortest path between two points on a round-earth, while the geometry datatype represents the shortest straight route between two points on a flat map.


Comments
Post new comment