Question regarding coordinate transformation
- From: ckirchho@xxxxxxxxxxxxxx
- Date: Thu, 6 Mar 2008 07:14:22 -0800 (PST)
Hello,
after searching around for a couple of hours I kinldy ask for help in
this newsgroup. Here is my task: I want to use GoogleMaps and add
Polygons to the map.
I've setup a test page with a little Javascript. After the map is
moved by the user, the Javascript sends a request via AJAX to a
backend application I wrote. It sends the coordinates as delivered by
the maps getBounds() funnction, which are in latitude and longitude.
The backend is developed in Delphi. I use the ShapeAPI to read the
contents of a Shapefile. I would like to find out which shapes lie
within the "viewport" (the currently visible area in the Google map).
Therefore I have to map the coordinates somehow. Problem is that the
values in the shapefile are in a different ccordinate system. I spent
some time finding information, but with a possible solutions I found,
I get to a point where I don't know how to proceed.
The shapefile (consisiting of several files) inlcudes a file with the
ending "prj" which contains information regarding the coordinate
system, projection, datum etc. How can I use that to either transform
those shapefiles coordinates to lat/lng values or to coordinate the
lat/lng values delivered from Google to the shape files coordinate
system?
I tried to use http://www.windreader.com/geodesy. It has a function
called LL2UTM. But as far as I can see my shapefile is - according to
the info in the prj file - transverse mercator, and not "universal
transverse mercator", which I thought is something different (by the
way, how would zone numbers and zone letters be stored in a
shapefile?) Anyway, that function needs a "geoid" besindes the lat
and lng values, and I don't know where to get this geoid from.
Even when I tried to do some transformation even not in Delphi, but on
soem webpages, I always end up at a point where I don't know how to
set certain parameters.
Example:
- The datum tag in the prj of one of the shapefiles I'd like to use
file says "D_Deutsches_Hauptdreiecksnetz". WIthin there is another tag
called spheroid, that contains"["Bessel_1841",
6377397.155,299.1528128]"
- When I go to http://www-ipf.bau-verm.uni-karlsruhe.de/cgi-bin/trafo.tcl
I am asked for the in and out coordinate system and even in the list
of predefined systems there are three options containing "Bessel". So
which one to take?
What I would like would be a solution where I could "just" enter the
numeric values given in the prj file of the shape file somehow and
then enter a point coordinate of the shape file data and get its lat
and lng values.
Immposible? I cannot believe that. I know that this is not trivial and
that some deep insight in the whole matter is needed, but I am truly
willing to learn. ;)
Any help will be very appreciated.
Best regards,
Christian Kirchhoff
.
- Follow-Ups:
- Re: Question regarding coordinate transformation
- From: Greg Troxel
- Re: Question regarding coordinate transformation
- Prev by Date: Re: Latitude/Longitude conversion question
- Next by Date: Re: Question regarding coordinate transformation
- Previous by thread: Re: Latitude/Longitude conversion question
- Next by thread: Re: Question regarding coordinate transformation
- Index(es):
Relevant Pages
|