[OpenLayers-Users] Spatialreference.org down

Hugo hfpmartins at gmail.com
Tue Mar 1 11:06:37 EST 2011


Hi Chris,

Thanks a lot for your clarifications about this. However i'm having problems
when reprojecting vector features with proj4js. Here are the steps taken:

1. Create a js file for each projection needed inside the defs folder of
proj4js
    example of EPSG 27492 with corrected local transformations parameters
(i've tried to use these parameters in postgis and all came out accurate)
    Proj4js.defs["EPSG:27492"] = "+proj=tmerc +lat_0=39.66666666666666
+lon_0=-8.131906111111112 +k=1 +x_0=180.598 +y_0=-86.98999999999999
+ellps=intl +pm=lisbon +units=m
+towgs84=-239.749,88.181,30.488,0.263,0.082,1.211,2.229";

2. Included proj4js-combined and all EPSGxxxxx.js in the web page

3. Defined projections using new OpenLayers.Projection('EPSG:xxxxx');

4. the code used to reproject:

var coordMarker = new OpenLayers.Geometry.Point(xcoord, ycoord); //these
coords in epsg 27492

OpenLayers.Projection.transform(coordMarker, hg73ipcc, mercator);

The coordinates introduced were x= 19300.924567 and y=-293208.893092 and the
output was x=-1897829.842341831 and y=4442821.889195204. The expected output
should be x=-881320.416615 and y=4442714.696599

I've tried to reproject from epsg:27492 to wgs84 and also got wrong
coordinates returned.
Am i missing something here??? Any sugestions to solve this?

Thanks in advance.
Best regards,

Hugo

-- 
Hugo Martins
LabNT - ISEGI UNL
Campus de Campolide
1070-312 Lisboa
N 38°43'56.84", W 9°9'35.74"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110301/1708d367/attachment.html


More information about the Users mailing list