[esri-geometry-api-java] Perform a within operations on an Envelope and a Point

1539
1
08-28-2013 03:12 AM
Michaelvan_der_Veeken
New Contributor
This is a question about the esr-geometry-api-java hosted on Esri's GitHub. Didn't know in what forum to post this question, sorry about that. Can one of the admins move it to a more proper location, if there is one?

I am trying to do a within operation on an Envelope and a Point, with different SpatialReferences. The first thing I notice is that a 'normal' Point and Envelope do not contain a SpatialReference, only the OGCPoint does (there is no OGCEnvelope, so I've used a OGCPolygon instead).

My Envelope needs to have a SpatialReference of WGS_1984_Web_Mercator_Auxiliary_Sphere (wkid:102100) and the Point needs to have a SpatialReference of GCS_WGS_1984 (wkid:4326). Since the first one is in meters, and the second one in decimal degrees there has to be some kind of transformation. I can't figure out how to do this. I need to know if the point is within the envelope.

I have found the WebGeometry object, which bundles a Geometry and a SpatialReference, but I can't figure out how to do spatial operations with it.
0 Kudos
1 Reply
EricBader
Occasional Contributor III
Hello!

I believe there may be a different forum more appropriate to handle your question. However, if you could explain a bit more about what you are trying to do overall, we might be able to help. Are you attempting to develop something with the ArcGIS Runtime SDK for Java?

Thanks!
0 Kudos