Is it possible to evaluate Latitude and Longitude using Openmap?

33 views
Skip to first unread message

Alejandro Bulgaris

unread,
Nov 10, 2019, 11:44:24 PM11/10/19
to openma...@googlegroups.com
Hi Don,

Given a Latitude and Longitude, I want to assert if they are within an specific country, in this case, within Australia. Is this something that can be done using Openmap?

Thank you in advance,
Alejandro

Don Dietrick

unread,
Nov 12, 2019, 9:54:45 AM11/12/19
to Alejandro Bulgaris, openma...@googlegroups.com
Hi Alejandro,

Yes, you can do this using the com.bbn.openmap.geo package.  The Intersection is the main player, the thing that does the geometry testing.

The best example of the geo package being used with a set of geometries is the com.bbn.openmap.layer.test.GeoIntersectionLayer.  That layer reads in shape files to create a SpatialIndex.  You can draw objects on the map, and the map is updated with notations where and if any of the drawn objects touch the shape file objects.

The Intersection and ExtentIndex (the spatial index that can organize how the Intersection class is called over a set of geospatial objects) use geospatial objects called GeoExtents, and you’ll notice there are several subclasses.  The GeoIntersectionLayer class demonstrates how they relate to OMGraphics - GeoExtents aren’t drawable objects, they are just used for calculations.

Let me know if you have questions if you dig into it.

- Don


--
You received this message because you are subscribed to the Google Groups "openmap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openmap-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openmap-users/CALWHYPYhUD1-Sh092broQ%2BYDT-w2cohhDwCr%2BRKjRSeNMA34jA%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages