Comments (4)
Hi @gwlucastrig, I'd be happy to help you with whatever approach. Making a PR could be a good starting point, if you have a need why not to try to get it fixed!
from proj4j.
Thanks. I'll take a look at the math and see how it fits within the existing code framework. I would want to make sure I could do something consistent with what you've already got. If I can do that, I'll submit a PR.
from proj4j.
I found the solution, no code changes required. The StereographicAzimuthalProjection has methods called setTrueScaleLatitude() and setTrueScaleLatitudeDegrees() that can be used to set the latitude at which the map scale will be true (1.0). Since the latitude at which I needed for the scale to be true was 75 degrees north, I used the following:
Datum datum = Datum.WGS84;
Ellipsoid ellipsoid = datum.getEllipsoid();
StereographicAzimuthalProjection p = new StereographicAzimuthalProjection(Math.PI / 2, 0);
p.setEllipsoid(ellipsoid);
p.setTrueScaleLatitudeDegrees(75.0);
p.initialize();
This does have the effect of making calls to initialize multiple times (it's called inside the constructor and by the application code), but it gets the job done. Incidentally, the latitude of true scale for Universal Polar Stereographic is approximately 81.11451786859362545 (Wikipedia). So I tested this approach by modifying my program to take that as the argument for setTrueScaleLatitudeDegrees() and comparing it to the results I got when using the setupUps() method provided by the projection class.
Unless you want additional information, I intend to close this issue.
from proj4j.
Incidentally, I notice that in Registry.java, there is an entry for Universal Transverse Mercator (UTM), but the one for Universal Polar Stereographic (UPS) is a commented-out placeholder. It would be straightforward to write a class for UPS derived from StereographicAzimuthalProjection with the appropriate constructor.
from proj4j.
Related Issues (20)
- How I can use vunits in android? HOT 1
- Will there be support for +geoidgrids ? its commonly used for height transformation HOT 1
- VN2000 Error Exception in thread "main" java.lang.IllegalStateException: Latitude is out of range: 9738.514891355962
- Transforming from "EPSG:4326" to "EPSG:3857" results in precision error
- Reprojection results seem to be too imprecise
- altitude not working when Projecting HOT 1
- rhealpix is not supported HOT 1
- Datum.isEqual maybe have a bug
- Unknown projection: longlat HOT 22
- gtx files cannot be used?
- reprojection from epsg:31370 to epsg:3857 is inaccurate HOT 1
- Transverse Mercator Projection test failed HOT 1
- Equidistant Azimuthal (ESRI:54032) test failed HOT 1
- Robinson projection (ESRI:54030) test failed HOT 2
- UnknownAuthorityCodeException: EPSG:9054 HOT 3
- ntv2 grid support
- Proj4j should not use the Apache License if it contains the EPSG data set HOT 16
- In release 1.2.0, the pom file contains incorrect version '1.2.0-SNAPSHOT' HOT 14
- Improve proj4j tests to reflect the recent changes and the moved out EPSG resources
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 proj4j.