![]() Using Geography data type which was introduced in sql server 2008 DECLARE geography RETURN below function gives distance between two geocoordinates in kilometres Set = 3958.75 * Atan(Sqrt(1 - 2)) / below function gives distance between two geocoordinates in kilometres CREATE FUNCTION FLOAT, FLOAT, FLOAT, FLOAT) ![]() The below function gives distance between two geocoordinates in miles create function. If you want to retain your existing data structure, you can still use STDistance, by constructing suitable geography instances using the Point method: DECLARE DECIMAL(12, 9) Naturally there will be an amount of learning to do first, but once you know it it's far far easier than implementing your own Haversine calculation plus you get a LOT of functionality. Telling us it is about 538 km from (near) London to (near) Edinburgh. Now you can run the label engine (MAP LabelPro / Label Feature) for the new point layer with offset.Since you're using SQL Server 2008, you have the geography data type available, which is designed for exactly this kind of data: DECLARE geography = 'POINT(0 51.5)' After placing labels for the point layer (blue), you can make the point layer invisible. The red point is the original and the blue points are the ones moved to the offset. Now, the points are moved to new position. In Tableau, a geographic role associates each value in a field with a latitude and longitude value. Open the Edit Schema window and apply "x_coord_withOffset" and "y_coord_withOffset" to #MapX and #MapY, respectively. Assign geographic roles to your geographic data. This method works for the Point layer as well. Use the same method as the one introduced in the previous post. Step 2: Move the points to the calculated coordinates with the offset values.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |