[OpenMap Users] Reading shp files with the OpenMap classes

From: Dav Stott <d.stott_at_csl.gov.uk>
Date: Fri, 23 Sep 2005 14:19:15 +0100 (GMT Standard Time)

Dear all,

I'm using the com.bbn.openmap.dataAccess.shape classes from some Coldfusion
scripts to read the contents of ESRI .shp files and have been largely
successful, so thanks all round for OpenMap!

I can read everything I need to from both points and polygons, but have a bit
of a puzzling issue with the polygon vertex coordinates. My .shp files always
have their coordinates stored as x & y values against the UK national grid.

Reading the coordinates of a point is simple enough, I call the getLat() and
getLon() methods and the numbers are returned exactly as they exist in the .shp
file.

However, when I look at the results of getLonLatArray() from the EsriPolygon
object, the numbers come out scaled down by a factor of approximately 57.29.

The javadoc suggests that all lat & lons are stored internally as radians. The
units themselves are largely irrelevant as I'm not processing them at all using
the OpenMap classes.

In a straw clutching moment, I tried putting the getLonLatArray() through
ProjMath.arrayRadToDeg() in the hope that would undo whatever transformation
was applied when the EsriPolygon objects were created, but that wasn't helpful
either.

I guess my question is:

- what transformation is occuring with the polygon coordinates that isn't with
   the point coordinates?
- and what, exactly, is the inverse operation?


I need to know pretty precisely what the scale factor is as I'm surveying data
down to sub-metre accuracy in places, and having things shuffle about due to a
transformation error would be embarrasing.

Thanks in advance,

Dav stott

-- 
--------------------------------------------------------------
Dav Stott                       Phone: +44 (0)1904 462137
Systems Development Engineer    GTN:   5129 2137
Information Systems Team
Central Science Laboratory      Fax:   +44 (0)1904 462111
Sand Hutton                     Email: d.stott_at_csl.gov.uk
York YO41 1LZ, UK               WWW:   http://www.csl.gov.uk/
--------------------------------------------------------------
--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Fri Sep 23 2005 - 09:29:19 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:07 EDT