How do I draw the points in an ESRI Polyline, given the bounding box as lat/long and the "points" as

Posted by Aaron on Stack Overflow See other posts from Stack Overflow or by Aaron
Published on 2010-05-08T13:43:31Z Indexed on 2010/05/08 13:48 UTC
Read the original article Hit count: 306

Filed under:
|
|
|
|

I'm using OpenMap and I'm reading a ShapeFile using com.bbn.openmap.layer.shape.ShapeFile. The bounding box is read in as lat/long points, for example 39.583642,-104.895486. The bounding box is a lower-left point and an upper-right point which represents where the points are contained. The "points," which are named "radians" in OpenMap, are in a different format, which looks like this: [0.69086486, -1.8307719, 0.6908546, -1.8307716, 0.6908518, -1.8307717, 0.69085056, -1.8307722, 0.69084936, -1.8307728, 0.6908477, -1.8307738, 0.69084626, -1.8307749, 0.69084185, -1.8307792].

How do I convert the points like "0.69086486, -1.8307719" into x,y coordinates that are usable in normal graphics?

I believe all that's needed here is some kind of conversion, because bringing the points into Excel and graphing them creates a line whose curve matches the curve of the road at the given location (lat/long). However, the axises need to be adjusted manually and I have no reference as how to adjust the axises, since the given bounding box appears to be in a different format than the given points.

The ESRI Shapefile technical description doesn't seem to mention this (http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf).

© Stack Overflow or respective owner

Related posts about esri

Related posts about shapefile