Comments (5)
Note for random readers: spatialreference.org (e.g.) has the projected bounds for the area of use, don't do it the hard way like I did.
from proj.
I suspect they're equivalent. I couldn't make never mind, I made a typo, but I guess they're almost the same thing anyway, but consider:cs2cs
work with OGC:CRS84
$ echo "-26471262.0 3462994.0" | cs2cs EPSG:3395 EPSG:4326 -f "%.8f"
29.84979984 122.20460755 0.00000000
$ echo "29.84979984 122.20460755" | cs2cs EPSG:4326 EPSG:3395 -f "%.8f"
13603754.68505784 3462993.99969395 0.00000000
$ echo "13603754.68505784 3462993.99969395" | cs2cs EPSG:3395 EPSG:4326 -f "%.8f"
29.84979984 122.20460755 0.00000000
# same point
Keep in mind that your point appears to be outside of the EPSG:3395
bounds:
$ projinfo EPSG:3395
PROJ.4 string:
+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs +type=crs
WKT2:2019 string:
PROJCRS["WGS 84 / World Mercator",
BASEGEOGCRS["WGS 84",
ENSEMBLE["World Geodetic System 1984 ensemble",
MEMBER["World Geodetic System 1984 (Transit)"],
MEMBER["World Geodetic System 1984 (G730)"],
MEMBER["World Geodetic System 1984 (G873)"],
MEMBER["World Geodetic System 1984 (G1150)"],
MEMBER["World Geodetic System 1984 (G1674)"],
MEMBER["World Geodetic System 1984 (G1762)"],
MEMBER["World Geodetic System 1984 (G2139)"],
ELLIPSOID["WGS 84",6378137,298.257223563,
LENGTHUNIT["metre",1]],
ENSEMBLEACCURACY[2.0]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4326]],
CONVERSION["World Mercator",
METHOD["Mercator (variant A)",
ID["EPSG",9804]],
PARAMETER["Latitude of natural origin",0,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8801]],
PARAMETER["Longitude of natural origin",0,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8802]],
PARAMETER["Scale factor at natural origin",1,
SCALEUNIT["unity",1],
ID["EPSG",8805]],
PARAMETER["False easting",0,
LENGTHUNIT["metre",1],
ID["EPSG",8806]],
PARAMETER["False northing",0,
LENGTHUNIT["metre",1],
ID["EPSG",8807]]],
CS[Cartesian,2],
AXIS["(E)",east,
ORDER[1],
LENGTHUNIT["metre",1]],
AXIS["(N)",north,
ORDER[2],
LENGTHUNIT["metre",1]],
USAGE[
SCOPE["Very small scale conformal mapping."],
AREA["World between 80°S and 84°N."],
BBOX[-80,-180,84,180]],
ID["EPSG",3395]]
$ echo "-80 -180" | cs2cs EPSG:4326 EPSG:3395 -f "%.8f"
-20037508.34278924 -15496570.73972372 0.00000000
# -26471262.0 < -20037508.34278924
from proj.
Have you confirmed that the result is correct when run with someone else got there first.cs2cs
?
from proj.
Thank you guys! Indeed I believe the issue is that the initial EPSG:3395 coordinates is out of bounds!
from proj.
Yeah, see my edit:
$ echo "-26471262.0 3462994.0" | cs2cs EPSG:3395 EPSG:4326 -f "%.8f"
29.84979984 122.20460755 0.00000000
$ echo "13603754.68505784 3462993.99969395" | cs2cs EPSG:3395 EPSG:4326 -f "%.8f"
29.84979984 122.20460755 0.00000000
from proj.
Related Issues (20)
- Add the possibility to convert all the types from geo-types
- Discussion: Move Transform trait from geo to proj? HOT 2
- Can't build crate as wasm target HOT 12
- Support conversion of Z/T
- include offline proj-data HOT 3
- Where (or how) to find built proj.db HOT 5
- There is a minimum CMake requirement which we should document HOT 2
- Proj#def returns Result even though it always returns Ok HOT 1
- Expose PjInfo struct HOT 3
- Clarify "network" feature is required for TIFF support HOT 2
- `Send` and `Sync` HOT 6
- Add "Geospatial" category to `Cargo.toml`
- New tiff feature flag should be plumbed from proj to proj-sys
- Need ability to convert 3D coordinates HOT 4
- How to build for windows? HOT 3
- proj-sys errors in build with gcc-13
- Windows builder in CI HOT 12
- Inconsistent transformations of coords between OSX and ubuntu HOT 9
- Proj isnt compiling in docker container, but does locally HOT 12
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 proj.