Solved

GPS Coords to map (x,y) coords convertation

Posted on 2004-08-11
2
1,914 Views
Last Modified: 2010-10-05
HI.

I have a problem.
I have a digital 2 dimensional map, I know this map 2d corners coordinates and this coordinates' GPS coordinates.
forexample :
   x,y                       longitude, latitude
  (0,0)                     (47,36'48 and 18,55'24)
  (map.width,0)       (47,28'52 and 18,55'28)
  (0,map.height)        (..... .....)
  (map.width,map.height) (... ...)
and so on...

How can I calibrate the longitude and the latitude If I get an another x,y points
like (20,20)  -----> (??? , ???)

I need a (delphi) procedure or function...
0
Comment
Question by:wwwbetyar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 500 total points
ID: 11774929
First of all, how are you storing coordinates values? a good form is in pure grades as a real number:

47g36'48" can be stored as: 47.613333 grades

Or you can store it as pure seconds (my prefered method because no loss of precision)

47g36'48" can be stored as: 171408 seconds

No matters how has you stored them (but need to be stored as a UNIQUE value) the conversion formula is:

lon' = x/mapW * (lonE-lonW) + lonW
lat' = y/mapH * (latS-latN) + latN

where:

x,y        = map coordinates position (ex. 20,20)
mapW,MapH  = map width and height
latW,latN  = upper-left corner of your map, expressed in geodesic coordinates
lonE,latS  = lower-right corner of your map

assuming (very important):
W coordinates are negatives
N coordinates are negatives



0
 

Author Comment

by:wwwbetyar
ID: 11778270
It seems to be good ...
So I accept this answear, but I tried it only only map...
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I feel like more and more people want to know how to programmatically convert addresses into geospatial locations. So in this article, I will show you how you can do it with Bing Maps. I'm going to use PowerShell, which is a nice scripting language,…
Introduction This article is designed to assist GIS (Geographic Information System) and GPS (Global Positioning System) developers using ESRI ArcGIS and other spatial information management systems.   For the uninitiated the concept of projectio…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question