Java library for reverse geocoding for Nominatim
Java
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 2 commits behind AtlisInc:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
COPYING
COPYING.LESSER
LICENSE
README.md
pom.xml

README.md

Nominatim-API

Java library for reverse geocoding using Nominatim API nominatim.openstreetmap.org

Maven Dependency

<dependency>
  <groupId>me.atlis</groupId>
  <artifactId>nominatim-api</artifactId>
  <version>RELEASE</version>
</dependency>

Usage

You can use both geocoding and reverse geocoding using this library.

Reverse Geocoding

Address address = new Address();
address.setCity("New York");
MapPoint mapPoint = NominatimAPI.with(endpointUrl).getMapPointFromAddress(address, 5);

Geocoding

Double latitude = 40.7470;
Double longitude = -73.9860;
MapPoint mapPoint = new MapPoint().buildMapPoint(latitude, longitude);
Address address = NominatimAPI.with(endpointUrl).getAddressFromMapPoint(mapPoint);

NominatimAPI is thread safe singleton. String endpointUrl = "http://nominatim.openstreetmap.org/" for example.

Dependencies

License

LGPL. See LICENSE file for details.