proj4j
proj4j copied to clipboard
Projection.getEPSGCode() always returns 0
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']
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.
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.