Skip to content

Commit

Permalink
Updated example coords in Readme
Browse files Browse the repository at this point in the history
Updated coords in first example to agree with #303 by dpraimeyuu.
  • Loading branch information
virtualarchitectures authored and ahocevar committed Nov 29, 2022
1 parent 2ad66a0 commit 6423fb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ When all 3 arguments are given, the result is that the coordinates are transfor
var firstProjection = 'PROJCS["NAD83 / Massachusetts Mainland",GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4269"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.68333333333333],PARAMETER["standard_parallel_2",41.71666666666667],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-71.5],PARAMETER["false_easting",200000],PARAMETER["false_northing",750000],AUTHORITY["EPSG","26986"],AXIS["X",EAST],AXIS["Y",NORTH]]';
var secondProjection = "+proj=gnom +lat_0=90 +lon_0=0 +x_0=6300000 +y_0=6300000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs";
//I'm not going to redefine those two in latter examples.
proj4(firstProjection,secondProjection,[2,5]);
proj4(firstProjection,secondProjection,[-122.305887, 58.9465872]);
// [-2690666.2977344505, 3662659.885459918]
```

The library can also parse coordinates provided with an elevation, again as an object of the form `{x:x,y:y,z:z}` or an array of the form `[x,y,z]`.

```javascript
proj4(firstProjection,secondProjection,[2,5,10]);
proj4(firstProjection,secondProjection,[-122.305887, 58.9465872,10]);
// [-2690666.2977344505, 3662659.885459918,10]
```

Expand Down

0 comments on commit 6423fb0

Please sign in to comment.