mbloch / mapshaper-proj Goto Github PK
View Code? Open in Web Editor NEWA JavaScript port of the Proj.4 map projection library.
License: Other
A JavaScript port of the Proj.4 map projection library.
License: Other
So I was about to post an issue on mapshaper to ask if this kind of project existed as part of your library and it does, woot!
So, would you mind saving me a little time and headache and explaining the easiest way to convert from UTM 18N, which is EPSG:26918, to latitude/longitude using your library's functions?
I've written my entire application on top of a port of mapshaper.org (I know, what a steal), so imagine that I've basically exported the model, map, and nav objects and have access to (most) of their functions. What would be the point of entry to pass in UTM coordinates to produce lat/lon coordinates?
Thanks for your time and awesomeness!
Paulana
QGIS and gdal seem to support Proj.4 projections that are not part of standard WKT by adding an extension attribute, like this: EXTENSION["PROJ4","+proj=eqearth +datum=WGS84 +wktext"]
.
We should do the same, even though ArcGIS and most other GIS applications will not be able to interpret this kind of .prj file.
The messages ported from Proj.4 can be confusing or wrong. Some examples:
$ echo 0 0 | mproj +init=epsg::3395
projection initialization failure
cause: no colon in init= string
$ echo 0 0 | mproj +init=eeee:3395
projection initialization failure
cause: no options found in 'init' file
I just released v0.17, which includes the the Equal Earth projection using the Proj.4 name "eqearth".
The mapshaper-proj source file is here
Original Java source file is here
(@berniejenny, I copied the comment block from your source code to comply with the Apache license that you're using, please let me know if there's a problem with the way I'm citing your work).
Link to journal article is here
+proj=eqearth
is already available in Mapshaper, here is a screenshot comparing Equal Earth to Robinson:
This will allow high-quality NAD27 to NAD83 conversion using the command line version of mapshaper.
There have been ~200 commits to the Proj.4 repo since I ported mapshaper-proj
(Currently only lowercase works)
First, thanks for such a fantastic resource. Mapshaper is truly impressive!
I'm wondering if you've considered adding support for some of the other D3 composite projections that are based on albersusa?
https://geoexamples.com/d3-composite-projections/
https://www.npmjs.com/package/geo-albers-usa-territories
Would be great to use this projections with mapshaper.
Information about both versions in proj website :
Recent improvement in mapshaper (antimeridian and circular clipping) are really great but maybe this kind of projection involve a different way of clipping.
Shouldn't throw an error for this kind of definition:
# Popular Visualisation CRS / Mercator (deprecated)
<3785> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs <>
Useful for saving to Shapefile after reprojecting.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.