Opened 14 years ago

Closed 13 years ago

#47 closed enhancement (fixed)

WKT parsing

Reported by: madair Owned by: madair
Priority: major Milestone: 1.0.2
Component: core Version: 1.0.1
Keywords: Cc:

Description

MapGuide doesn't use EPSG codes and uses WKT to specify their coordinate systems, so we can add WKT parsing to Proj4js

Attachments (1)

wkt_patch.patch (1.4 KB ) - added by madair 14 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 by madair, 14 years ago

Status: newassigned

from Fredrik Blomqvist:

While trying to load an ArcGis map that depended on wkt for projection into OpenLayers I found your latest/upcoming Proj4js wkt addition, http://trac.osgeo.org/proj4js/changeset/1873.

When trying it out I believe I found and fixed couple of issues. See attached patch. Summary:

  1. case handling when comparing parameters.
  2. degree to radians conversion.
  3. missing to call deriveConstants after parsing

Here's the complete WKT string I used (from http://OneMap.sg)


"PROJCS[\"SVY21\",GEOGCS[\"SVY21[WGS84]\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137.0,298.257223563]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_Easting\",28001.642],PARAMETER[\"False_Northing\",38744.572],PARAMETER[\"Central_Meridian\",103.8333333333333],PARAMETER[\"Scale_Factor\",1.0],PARAMETER[\"Latitude_Of_Origin\",1.366666666666667],UNIT[\"Meter\",1.0]]"


HTH, thanks for enabling great mapping services!

by madair, 14 years ago

Attachment: wkt_patch.patch added

comment:2 by madair, 14 years ago

patch applied at rev [1936]

comment:3 by madair, 13 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.