Comments (1)
Hi
Unfortunately not all projected CRSs are in metres - e.g particularly in the US, some are metres, some are international feet, some are US survey feet. In some cases there are even multiple CRS definitions for what is fundamentally the same projection, just using different units of measurement e.g. EPSG 3678/3679/3680 which are NAD83(NSRS2007) / Utah North
, NAD83(NSRS2007) / Utah North (ft)
and NAD83(NSRS2007) / Utah North (ftUS)
respectively.
It's for this sort of reason the library is quite insistent on making specify the units involved the hard way.
However if you want to implement an auto-unit implementation yourself that should be doable - you can do something like this
$crs = Projected::fromSRID(Projected::EPSG_WHATEVER);
$axes = $crs->getCoordinateSystem->getAxes();
$eastingUnitOfMeasureId = $axes->getAxisByName(Axis::EASTING)->getUnitOfMeasureId();
$easting = UnitOfMeasureFactory::makeUnit(12.345, $eastingUnitOfMeasureId );
$northingUnitOfMeasureId = $axes->getAxisByName(Axis::NORTHING)->getUnitOfMeasureId();
$northing = UnitOfMeasureFactory::makeUnit(12.345, $northingUnitOfMeasureId );
$point = ProjectedPoint::createFromEastingNorthing($crs, $easting, $northing);
from phpcoord.
Related Issues (20)
- Calculations for grs80 to latlng HOT 4
- toWGS84() function HOT 1
- Accuracy of Lat/Lng to Easting/Northing HOT 2
- Load ten figure UK grid refs HOT 7
- Possibility to map UTM coordinates to a different zone? HOT 13
- ITM to WGS84 error
- Irish Grid to WGS84 problems HOT 6
- Library upgrade assistance HOT 3
- Uncaught Error: Class 'PHPCoord\CoordinateReferenceSystem\Projected' not found HOT 4
- Lat/long from eastings & northings v4 HOT 6
- License requirments of the EPSG dataset HOT 4
- I experience a memory leak HOT 2
- Accuracy of EPSG_AMERSFOORT_RD_NEW ⇒ EPSG_WGS_84 conversion HOT 23
- Division by zero HOT 2
- EPSG_AMERSFOORT_RD_NEW ⇒ EPSG_WGS_84 conversion no longer working HOT 6
- Can not convert from epsg:7415 to epsg:4979 HOT 2
- Retrieving Coordinate Systems to Display HOT 1
- deprecation warning php 8: Optional parameter ... declared before required parameter HOT 4
- Convert WGS 84 Coordinates to DHDN / 3-degree Gauss-Kruger zone 4 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpcoord.