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