Comments (6)
@pomadchin I think the comments to the Projection.initialize()
method says a lot about its uses.
/**
* Initialize the projection. This should be called after setting parameters and before
* using the projection.
* This is for performance reasons as initialization may be expensive.
*/
public void initialize() {
spherical = (e == 0.0);
one_es = 1-es;
rone_es = 1.0/one_es;
totalScale = a * fromMetres;
totalFalseEasting = falseEasting * fromMetres;
totalFalseNorthing = falseNorthing * fromMetres;
}
Looking at the codes, the projections that require further initialization override this method and in all cases call the base method.
The easiest way to manage such project is to file known issues as tasks, otherwise, it is not obvious when you download the sources. I have done that with my current project on GitHub
SharpVectors/issues
I am running into these issues, because I started porting it to .NET/C#, which gives me the opportunity to look at the sources file by file, and I am filing these issues to draw attention to them.
from proj4j.
The story is that lots of projections (i.e. LandsatProjection) require some love as well as the entire project code (actually we're an open source project, you can help us). We know that there are lot's of issues with the codebase.
In case of initialize, I'm pretty sure 1. it is not required in all the cases, and I don't see how did you figure out that it is required everywhere - all projections rely on different parameters. Mb only from the code hygiene point. 2. the LandsatProjection
doesn't properly work.
from proj4j.
@paulushub are you sure that all projections use
spherical, one_es, rone_es, totalScale, totalFalseEasting, totalFalseNorthing
?
For instance Landsat uses none of these parameters => that is why the lack of this call won't break anything. Mb for the code hygiene purposes it makes sense to make code more readable though.
I'm pretty sure that all non standard projections don't use common parameters and it can explain the lack of init method and lack of overrided constructors.
I see, here is the pointer to tests with non working projections we have a bunch of tests that are failing due to some bad math. Hope it will help you.
from proj4j.
Also I appreciate a lot all the issues created, thank you!
from proj4j.
@paulushub are you sure that all projections use
Possibly not, but since this is also a port of the C/C++ codes, it is safer to simply follow the pattern defined in the comment, rather than searching to find if a project/inverse needs that or not.
from proj4j.
I would like even to get rid of the init method tbh.
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
- Support for polar stereographic with alternate scales HOT 4
- altitude not working when Projecting HOT 1
- rhealpix is not supported HOT 1
- Datum.isEqual maybe have a bug
- Unknown projection: longlat HOT 23
- 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 HOT 3
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.