[OpenMap Users] converting lat/lon to easting/northing for NAD_1983_StatePlane_Texas_Central_FIPS_4203?

From: Rob Ratcliff <rratcliff_at_ticom-geo.com>
Date: Fri, 01 Oct 2004 17:02:56 -0500

I'm writing a simple little client that queries a ArcGIS server for data.
The data is in the
NAD_1983_StatePlane_Texas_Central_FIPS_4203 projection which is defined as:

32139 NAD_1983_StatePlane_Texas_Central_FIPS_4203
PROJCS["NAD_1983_StatePlane_Texas_Central_FIPS_4203",GEOGCS["GCS_North_American_1983",DATUM["D_North_Ameri
can_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]
],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",700000],PARAMETER["False_Northing",3000000],
PARAMETER["Central_Meridian",-100.3333333333333],PARAMETER["Standard_Parallel_1",30.11666666666667],PARAMETE
R["Standard_Parallel_2",31.88333333333333],PARAMETER["Latitude_Of_Origin",29.66666666666667],UNIT["Meter",1]]

I have to give it an envelope with the coordinates defined in it's
coordinate system. I'm using the CADRG projection within OpenMap.

After fiddling with it awhile and bugging Don and others with questions, I
came up with this approximation:

                                 ...
                                 double factor = 5280*1.1508;
                                 // origin of local coordinate system
                                 float lat0 = 29.666667f;
                                 float lon0 = -100.333333f;
                                 float x0 = 2296583.333333f;
                                 float y0 = 9842500.0000f;

                                 // bounds of openmap screen
                                 float minx =
this.getProjection().getUpperLeft().getLongitude();
                                 float maxy =
this.getProjection().getUpperLeft().getLatitude();
                                 float maxx =
this.getProjection().getLowerRight().getLongitude();
                                 float miny =
this.getProjection().getLowerRight().getLatitude();

                                 // calculate bounds in local coordinate system
                                 double rminx =
factor*Geo.distanceNM(lat0,lon0,lat0,minx) + x0;
                                 double rmaxx =
factor*Geo.distanceNM(lat0,lon0,lat0,maxx) + x0;
                                 double rminy =
factor*Geo.distanceNM(lat0,lon0,miny,lon0) + y0;
                                 double rmaxy =
factor*Geo.distanceNM(lat0,lon0,maxy,lon0) + y0;


                                 lines.append("<ENVELOPE minx='"+rminx+"'
miny='"+rminy+"' " +
                                                          "
maxx='"+rmaxx+"' maxy='"+rmaxy +"' " +
                                                          "
name='Initial_Extent' />");
                                 //lines.append("<MAPUNITS
units=\"decimal_degrees\" />");
                                 //lines.append("<FILTERCOORDSYS id='32139'
/>");
                                 //lines.append("<FEATURECOORDSYS id='4326'
/>");
                                 lines.append("<MAPUNITS units='feet' />");
                                 ...

Unfortunately, I'm off by 10,000 ft or so. Has somebody done this kind of
thing before?

I should be getting numbers like this example:

Bounding Coordinates:
West Bounding Coordinate: -98.179725
East Bounding Coordinate: -97.363673
North Bounding Coordinate: 30.630058
South Bounding Coordinate: 30.015643

Local Bounding Coordinates:
Left Bounding Coordinate: 2978077.571114
Right Bounding Coordinate: 3230603.902780
Bottom Bounding Coordinate: 9981817.451761
Top Bounding Coordinate: 10199521.410375

Thanks,

Rob



--
[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 Oct 01 2004 - 18:05:36 EDT

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