public void setSpatialReferenceByValue(SpatialReference sr) throws ObjectStreamException { try { if (sr.getID() > 0) wkid = sr.getID(); else wkt = sr.getText(); } catch (Exception ex) { throw new InvalidObjectException("Cannot serialize this geometry"); } } }
public void setSpatialReferenceByValue(SpatialReference sr) throws ObjectStreamException { try { if (sr.getID() > 0) wkid = sr.getID(); else wkt = sr.getText(); } catch (Exception ex) { throw new InvalidObjectException("Cannot serialize this geometry"); } } }
/** * Returns string representation of the class for debugging purposes. The * format and content of the returned string is not part of the contract of * the method and is subject to change in any future release or patch * without further notice. */ public String toString() { return "[ tol: " + getTolerance() + "; wkid: " + getID() + "; wkt: " + getText() + "]"; } }
/** * Returns string representation of the class for debugging purposes. The * format and content of the returned string is not part of the contract of * the method and is subject to change in any future release or patch * without further notice. */ public String toString() { return "[ tol: " + getTolerance() + "; wkid: " + getID() + "; wkt: " + getText() + "]"; } }
private static void writeSR(SpatialReference spatialReference, JsonWriter jsonWriter) { int wkid = spatialReference.getOldID(); if (wkid > 0) { jsonWriter.addPairObject("spatialReference"); jsonWriter.addPairInt("wkid", wkid); int latest_wkid = spatialReference.getLatestID(); if (latest_wkid > 0 && latest_wkid != wkid) { jsonWriter.addPairInt("latestWkid", latest_wkid); } jsonWriter.endObject(); } else { String wkt = spatialReference.getText(); if (wkt != null) { jsonWriter.addPairObject("spatialReference"); jsonWriter.addPairString("wkt", wkt); jsonWriter.endObject(); } } } }
private static void writeSR(SpatialReference spatialReference, JsonWriter jsonWriter) { int wkid = spatialReference.getOldID(); if (wkid > 0) { jsonWriter.addPairObject("spatialReference"); jsonWriter.addPairInt("wkid", wkid); int latest_wkid = spatialReference.getLatestID(); if (latest_wkid > 0 && latest_wkid != wkid) { jsonWriter.addPairInt("latestWkid", latest_wkid); } jsonWriter.endObject(); } else { String wkt = spatialReference.getText(); if (wkt != null) { jsonWriter.addPairObject("spatialReference"); jsonWriter.addPairString("wkt", wkt); jsonWriter.endObject(); } } } }