[Proj] How do I make a proj4 EPSG projection file with adjusted bounds

Joel joel at srcti.com
Sat Feb 20 12:16:40 EST 2010


Hi -

How do I make a proj4 EPSG projection file that works to transform GPS deg
decimal to TransverseMercator projection with adjusted bounds.


I have my map and layers defined as the following:

            OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;
                var bounds = new OpenLayers.Bounds(
                    1059161.886961375, 1799425.612618936,
                    1217175.2129157984, 1966132.2372266736
                );

                var mapoptions = {
                    controls: [],
                    maxExtent: bounds,
                    maxResolution: 651.1977523739752,
                    projection: "EPSG:26771",
                    units: 'm'
                };

               map = new OpenLayers.Map('map', mapoptions);
                // setup tiled layer
                state1tiled = new OpenLayers.Layer.WMS(
                    "sf:Export_OutputCityBoundry - Tiled",
"http://localhost:8082/geoserver/wms",
                    {
                        height: '445',
                        width: '770',
                        layers:
'sf:Export_OutputCityBoundry,sf:Export_OutputWater,sf:Export_OutputMajorStreets1',
                        styles: '',
                        srs: 'EPSG:26771',
    numZoomLevels:8,
                        format: format,
                        tiled: 'true',
                        tilesOrigin : "1079161.886961375,1799425.612618936"
                    },
                    {buffer: 0}
                );
             

sf:Export_OutputCityBoundry

SRS WKT:  PROJCS["NAD27 / Illinois East", GEOGCS["NAD27", DATUM["North
American Datum 1927", SPHEROID["Clarke 1866", 6378206.4, 294.9786982138982,
AUTHORITY["EPSG","7008"]], TOWGS84[-4.2, 135.4, 181.9, 0.0, 0.0, 0.0, 0.0],
AUTHORITY["EPSG","6267"]], PRIMEM["Greenwich", 0.0,
AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295],
AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH],
AUTHORITY["EPSG","4267"]], PROJECTION["Transverse Mercator",
AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian",
-88.33333333333333], PARAMETER["latitude_of_origin", 36.666666666666664],
PARAMETER["scale_factor", 0.999975], PARAMETER["false_easting", 500000.0],
PARAMETER["false_northing", 0.0], UNIT["foot_survey_us",
0.30480060960121924], AXIS["Easting", EAST], AXIS["Northing", NORTH],
AUTHORITY["EPSG","26771"]]  
Native SRS WKT:  PROJCS["NAD_1983_StatePlane_Illinois_East_FIPS_1201_Feet",
GEOGCS["GCS_North_American_1983", DATUM["D_North_American_1983",
SPHEROID["GRS_1980", 6378137.0, 298.257222101]], PRIMEM["Greenwich", 0.0],
UNIT["degree", 0.017453292519943295], AXIS["Longitude", EAST],
AXIS["Latitude", NORTH]], PROJECTION["Transverse_Mercator"],
PARAMETER["central_meridian", -88.33333333333333],
PARAMETER["latitude_of_origin", 36.666666666666664],
PARAMETER["scale_factor", 0.999975], PARAMETER["false_easting", 984250.0],
PARAMETER["false_northing", 0.0], UNIT["foot_survey_us",
0.3048006096012192], AXIS["X", EAST], AXIS["Y", NORTH]]  
 Bounding Box:  
Data min X:  1085435.2199593033  Data min Y:  1807003.1864647423  
Data max X:  1210901.87991787    Data max Y:  1958554.6633808673  
Min Long:-87.9422506107938     Min Lat: 41.64397219008913  
Max Long:-87.52018418018955    Max Lat: 42.02423221521252  
 
I am trying to use proj4

src = new OpenLayers.Projection('EPSG:4326');
dest = new OpenLayers.Projection('EPSG:2193');
markergeom = new OpenLayers.Geometry.Point(gpsx,gpsy);
//now in-place re-projection
OpenLayers.Projection.transform(markergeom, src, dest);
gpsx = markergeom.x;
gpsy = markergeom.y;
alert("from WGS84:" + gpsx + "," + gpsy);

For -87.66646666666666,41.90336666666667

I tried it and it gives me:

from WGS84:444721.56582364725,4639284.90907464

instead of  1160049.27959, 1912889.44114

How do I make a proj4 EPSG projection that works???

- Joel 
-- 
View this message in context: http://n2.nabble.com/How-do-I-make-a-proj4-EPSG-projection-file-with-adjusted-bounds-tp4603548p4603548.html
Sent from the PROJ.4 mailing list archive at Nabble.com.


More information about the Proj mailing list