Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/main/java/com/esri/core/geometry/GeometryEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public class GeometryEngine {


/**
* @deprecated String

@randallwhitman randallwhitman Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @deprecated String
* @deprecated Use jsonToGeometry(String)

* Imports the MapGeometry from its JSON representation. M and Z values are
* not imported from JSON representation.
*
Expand All @@ -55,6 +56,7 @@ public class GeometryEngine {
* @return The MapGeometry instance containing the imported geometry and its
* spatial reference.
*/
@Deprecated
public static MapGeometry jsonToGeometry(JsonParser json) {
MapGeometry geom = OperatorImportFromJson.local().execute(Geometry.Type.Unknown, new JsonParserReader(json));
return geom;
Expand Down Expand Up @@ -95,11 +97,11 @@ public static MapGeometry jsonToGeometry(String json) {
}

/**
* Exports the specified geometry instance to it's JSON representation.
* Exports the specified geometry instance to its JSON representation.
*
* See OperatorExportToJson.
*
* @see GeometryEngine#geometryToJson(SpatialReference spatialiReference,
* @see GeometryEngine#geometryToJson(SpatialReference spatialReference,
* Geometry geometry)
* @param wkid
* The spatial reference Well Known ID to be used for the JSON
Expand All @@ -114,7 +116,7 @@ public static String geometryToJson(int wkid, Geometry geometry) {
}

/**
* Exports the specified geometry instance to it's JSON representation. M
* Exports the specified geometry instance to its JSON representation. M
* and Z values are not imported from JSON representation.
*
* See OperatorExportToJson.
Expand Down Expand Up @@ -177,7 +179,7 @@ public static String geometryToGeoJson(int wkid, Geometry geometry) {
}

/**
* Exports the specified geometry instance to it's JSON representation.
* Exports the specified geometry instance to its JSON representation.
*
* See OperatorImportFromGeoJson.
*
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/esri/core/geometry/JsonParserReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class JsonParserReader implements JsonReader {

private JsonParser m_jsonParser;

@Deprecated
public JsonParserReader(JsonParser jsonParser) {
m_jsonParser = jsonParser;
}
Expand All @@ -46,7 +47,7 @@ public static JsonReader createFromString(String str) {
try {
JsonFactory factory = new JsonFactory();
JsonParser jsonParser = factory.createParser(str);

jsonParser.nextToken();
return new JsonParserReader(jsonParser);
}
Expand Down Expand Up @@ -168,4 +169,3 @@ else if (t == Token.VALUE_FALSE)
throw new JsonGeometryException("Not a boolean");
}
}

2 changes: 2 additions & 0 deletions src/main/java/com/esri/core/geometry/SpatialReference.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ boolean isLocal() {
}

/**
* @deprecated String

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @deprecated String
* @deprecated Use fromJson(String)

* Returns spatial reference from the JsonParser.
*
* @param parser
Expand All @@ -83,6 +84,7 @@ boolean isLocal() {
* @throws Exception
* if parsing has failed
*/
@Deprecated
public static SpatialReference fromJson(JsonParser parser) throws Exception {
return fromJson(new JsonParserReader(parser));
}
Expand Down