Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following scenario:

  • Oracle database without the spatial module.
  • Application in J2EE with the following architecture: -- Entity -- Persistence (DAO / JPA + JDBC) -- Business (BC) -- Vision (MB + JSF)

I have an entity called EQUIPMENT must have the attribute COORD. Persist this entity in the database is easy, I'll use JPA.

When I enter the system, it should use geolocation to determine the position of the equipment and check if its position is a certain radius from what is recorded in the database.

Which APIs should I use to do this type of query considering I do not have the spatial module of the Oracle?

share|improve this question
Are you sure you have no spatial functionality at all? If you have Oracle 10 or 11 you should have basic locator functionality by default (no special license required). Depending on which version you have there will be licensing restrictions on which spatial functions you're permitted to use. – tomfumb Jul 15 '13 at 19:28

By "space module" I imagine you are referring to the Oracle Spatial database option.

While Oracle Spatial provides advanced functionality like geocoding, managing 3D objects (solids, point clouds, tins), managing and searching networks, storing and processing rasters, if all you need to do is to store, query and process 2D vector data, then you can do this with any Oracle database.

All Oracle database editions (Enterprise Edition, Standard Edition, Standard one and even Express) come with Oracle Locator, the subset of Oracle that provides full support for 2D vectors at no extra cost.

You can do the kind of search you need by writing a simple SQL statement that uses the SDO_WITHIN_DISTANCE() predicate. Of course, you can combine that with any mix of attribute queries - for example only process EQUIPMENTs in a certain status.

Functions such as SDO_GEOM.SDO_DISTANCE() can return the actual distance between your base location and the equipments returned by the query. Use that for ordering the results or for further processing.

share|improve this answer
Thanks. I used the Java Topology Suite, but, I will try this solution! – Luciano Borges Sep 6 '13 at 11:46
Try to be mindful of licensing restrictions - 10g and 11g have significantly different levels of functionality licensed with Oracle Locator. It is surprisingly easy to violate your license and never even know you've done something wrong. – tomfumb Jan 12 '15 at 23:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.