[OSM-dev] Some help with proj.4
artem at mapnik.org
Sat Apr 7 09:27:05 BST 2007
> I'm reading the OSM data from a postgis DB in my C++ application. I
> like to render the map with OpenGL. So I started with the city
> names to
> get something displayed. My app reads some cities and coordinated from
> City: München
> lon: 11.5755230215163
> lat: 48.1372329809622
> City: Homburg/Saar
> lon: 7.34116847416298
> lat: 49.3216296092266
> City: Hanau
> lon: 8.91677718097002
> lat: 50.1335169934201
> City: Münster
> lon: 7.61953662105138
> lat: 51.9614481894247
> I like to transfor the lon/lat coordinated to a format (e.g. mercator
> projected) that I could draw in my OpenGL window.
You can draw geographic coordinates ( lat/lon) or projected
coordinates ( e.g mercator) in OpenGL window.
You might find you'll need some concept of a viewport and scale those
> I think proj.4 is a
> good way to do this. Now I try to understand the proj application
> before using the C API. But the input coordinates for proj look
> # coordinates for a few cities
> 45d15n 71d07w Boston, United States
> 40d40n 73d58w New York, United States
> 48d51n 2d20e Paris, France
> 51d30n 7’w London, England
> I'm a GIS beginner and don't really know what's the difference between
> this coordinate style and the lon/lat above. How could I transform my
> coordinates to this style?
This is just another notation for decimal longitude/latitude using
degrees, minutes , seconds.
1 deg = 60 min
1 min = 60 sec ..
west, east, north, south would give you sign of an angle.
I don't know about you application but It is quite simple to write an
OpenGL renderer for Mapnik in C++ and re-use projections
transformations, styling , data access etc. If you're interested I
can help you to get started.
> dev mailing list
> dev at openstreetmap.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dev