laptop and a wrench

Bug

Unable to retrieve the EPSG code for the SpatialReference from the WebContext using WebContext.getSpatialReferenceId() or WebContext.getSpatialReference().getId(). The methods always return -1.

Last Published: August 25, 2014 ArcGIS Server (Java)
Bug ID Number NIM040065
SubmittedNovember 12, 2008
Last ModifiedJune 5, 2024
Applies toArcGIS Server (Java)
Version found9.2
Program languageJava
Operating SystemWindows OS
Operating System Version2003
StatusWill Not Be Addressed

Additional Information

No Public Explanation

Workaround

Using the Spatial Reference Definition String, the PeCoordinateSystem, and PeFactory the EPSG code can be obtained.Sample code:String defString = context.getSpatialReferenceDefinitionString();PeCoordinateSystem pecoordinatesystem = PeCoordinateSystem.fromString(defString);int EPSG = PeFactory.getCode(pecoordinatesystem);

Steps to Reproduce

Bug ID: NIM040065

Software:

  • ArcGIS Server (Java)

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options