mercator

OpenLayers : How to calculate distance between two points?

孤者浪人 提交于 2019-12-04 17:49:45
问题 How can one calculate the distance in OpenLayers between 2 points using Mercator projection? Thanks 回答1: use point1.distanceTo(point2) var Geographic = new OpenLayers.Projection("EPSG:4326"); var Mercator = new OpenLayers.Projection("EPSG:900913"); function distanceBetweenPoints(latlng1, latlng2){ var point1 = new OpenLayers.Geometry.Point(latlng1.lon, latlng1.lat).transform(Geographic, Mercator); var point2 = new OpenLayers.Geometry.Point(latlng2.lon, latlng2.lat).transform(Geographic,

how to Convert Lat ,long to an XY coordinate system (e.g. UTM) and then map this to pixel space of my Image

点点圈 提交于 2019-12-04 08:37:33
问题 I have a very small area map , which I downloaded from Openstreet map(PNG) and also its OSM(.osm) file which contains its Lat ,long. Now I want to convert Lat ,long to an XY coordinate system (e.g. UTM) and then map this to pixel space of my Image which is of size (600 x 800 ). I know its a two way process ,like to know how to do this . Thank you 回答1: GPS Coordinates to Pixels Assuming this map does not cross prime meridian Assuming pixel 0,0 is upper left, and pixel 600,800 is lower right.

how to Convert Lat ,long to an XY coordinate system (e.g. UTM) and then map this to pixel space of my Image

余生长醉 提交于 2019-12-03 00:17:45
I have a very small area map , which I downloaded from Openstreet map(PNG) and also its OSM(.osm) file which contains its Lat ,long. Now I want to convert Lat ,long to an XY coordinate system (e.g. UTM) and then map this to pixel space of my Image which is of size (600 x 800 ). I know its a two way process ,like to know how to do this . Thank you GPS Coordinates to Pixels Assuming this map does not cross prime meridian Assuming pixel 0,0 is upper left, and pixel 600,800 is lower right. Assuming map is Northern Hemisphere Only (no part of map is southern hemisphere) Determine the left-most

Equirectangular map on Web

孤街浪徒 提交于 2019-12-02 17:17:56
问题 I plan to build an online map for markers (pins) of a game and I don't manage to set the correct latitude of my markers. Original map is a square of 2048*2048px Then I got markers (many thousands) Map coordinates are set with a x, y notation from 0 to 100. 0, 0 is the top left corner and 100, 100 is the bottom right corner of the map. x=50, y=50 is lat = 0°, lng = 0° (the center of the picture). To convert from my notation to longitude I use this JS function, it works well : function

How do I use a web mercator projection map for SCNMaterial on an SCNShere geometry?

时光毁灭记忆、已成空白 提交于 2019-12-01 11:23:01
I have a simple globe view in my app. Previously we were using WhirlyGlobe, but have opted to use SceneKit instead. Everything works great and we are happy with it EXCEPT we used map tiles in Whirly Globe and the do not work (as far as I can tell) in SceneKit. We want to use that map (tiled, split or as one file) on an SCNSphere geometry. I copied the satellite map that Apple uses in their documentation and it looks right, but is not the map we need. Our map is in web/sphere mercator projection and it looks bad in SceneKit on my sphere. I do not* know what the 2x1 projection Apple is using is

How do I use a web mercator projection map for SCNMaterial on an SCNShere geometry?

帅比萌擦擦* 提交于 2019-12-01 09:45:21
问题 I have a simple globe view in my app. Previously we were using WhirlyGlobe, but have opted to use SceneKit instead. Everything works great and we are happy with it EXCEPT we used map tiles in Whirly Globe and the do not work (as far as I can tell) in SceneKit. We want to use that map (tiled, split or as one file) on an SCNSphere geometry. I copied the satellite map that Apple uses in their documentation and it looks right, but is not the map we need. Our map is in web/sphere mercator

Android: How To: mark the current location into a map (still image) - SOURCE CODE,TESTCASE,ACTUAL,EXPECTED OUTPUT ADDED

旧城冷巷雨未停 提交于 2019-11-28 12:37:53
问题 I have created another question (How to display a map (still image file) with a moving current location) But it contains 2 (two) questions, so i need to segregate it. I am trying to create a prototype that could guide a person to his destination place. place is a wide building with several floors. i can obtain/retrieve the maps (still images). e.g. current:1F destination:5F; so I can get the still images of 1st,2nd...5th floors (5 image files). Scenario: start the application input the

Convert latitude/longitude point to a pixels (x,y) on mercator projection

喜你入骨 提交于 2019-11-26 00:40:21
问题 I\'m trying to convert a lat/long point into a 2d point so that I can display it on an image of the world-which is a mercator projection. I\'ve seen various ways of doing this and a few questions on stack overflow-I\'ve tried out the different code snippets and although I get the correct longitude to pixel, the latitude is always off-seems to be getting more reasonable though. I need the formula to take into account the image size, width etc. I\'ve tried this piece of code: double minLat =

Convert latitude/longitude point to a pixels (x,y) on mercator projection

你说的曾经没有我的故事 提交于 2019-11-25 20:31:23
I'm trying to convert a lat/long point into a 2d point so that I can display it on an image of the world-which is a mercator projection. I've seen various ways of doing this and a few questions on stack overflow-I've tried out the different code snippets and although I get the correct longitude to pixel, the latitude is always off-seems to be getting more reasonable though. I need the formula to take into account the image size, width etc. I've tried this piece of code: double minLat = -85.05112878; double minLong = -180; double maxLat = 85.05112878; double maxLong = 180; // Map image size (in