Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Projection.getEPSGCode() always returns 0 #24

Open
securedimensions opened this issue Mar 18, 2019 · 2 comments
Open

Projection.getEPSGCode() always returns 0 #24

securedimensions opened this issue Mar 18, 2019 · 2 comments

Comments

@securedimensions
Copy link

What is the method to get the integer code for a CRS identified by name?

The method getESPGCode() has hardcodes return 0:

    /**
     * Returns the ESPG code for this projection, or 0 if unknown.
     */
    public int getEPSGCode() {
        return 0;
    }

[lines 750-755 of file òrg.locationtech.proj4j.proj.Projection']

@pomadchin
Copy link
Member

It is an a way to define default methods here. Usually it is overloaded in some child class, for example like it is done in a WebMercator class.

@echeipesh
Copy link
Contributor

To clarify these issue further, this would not the the CRS EPSG but rather the EPSG code of the Projection or OperationMethod in EPSG parlance.

For instance EqualAreaAzimuthalProjection.java would be EPSG::9820

I think the only way to really handle address this issue to manually review the list of projections offered here and update the method override. Although I have to say that at least in my use case I have never had to consider the Projection EPSG code as separate from CRS EPSG code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants