I am working on a web project that stores locations for users. The project currently uses MySql 5.5 and JPA 2 to map the relationship database, and EJB 3.1 as a middle tier. I store longitude and latitude data in decimal data types in MySql.
I want to expand the project so that the user can search for points (GPS coordinates) near the place that he will mark (using Google Map API 3) on the map.
I need some tips and suggestions before starting to convert or modify components in my project. If possible, with a tutorial and how to make changes and what tools (library, tools for developers, etc.). Here are my questions.
- Can I use the Spatial extension in MySql (using data types such as Point) and map this to objects supported by JPA 2 (for example, DataNucleus library, if supported by JPA 2). It is light weight and can be stored in them through a permanent layer.
- Is it better to upgrade to PostGIS and Postgres (which seem to have better spatial support) with all the pain and effort needed to change the database and use sleep mode instead. Netbeans supports Hibernate, but when I try to use JDBC for PostGis, I run into problems. Good guidance is needed to get started if I go down this road.
- Use the infrastructure that is already in place and calculate the distance from lactation A and B. Similar to how this is done in this article by Jan Philip Matuschek
Sorry I have collected questions. Regards Chris
Chris source
share