Routify Documentation
Loading...
Searching...
No Matches
ch.routify.revgeocode.RevGeoCode Class Reference

Static Public Member Functions

static void main (String[] args) throws Exception
 
static CustomVertex getCoordinates (String address) throws Exception
 
static Tuple2< CustomVertex, CustomVertexresolveRequestAddresses (JSONObject data) throws Exception
 
static String getHTML (String urlToRead) throws Exception
 

Detailed Description

The RevGeoCode class provides functionality to reverse geocode addresses to geographic coordinates using the Photon GeoCoder. It includes methods to convert an address string to a CustomVertex object representing its geographic location (latitude and longitude).

Member Function Documentation

◆ getCoordinates()

static CustomVertex ch.routify.revgeocode.RevGeoCode.getCoordinates ( String address) throws Exception
inlinestatic

Converts an address to a CustomVertex object representing its geographic coordinates (latitude and longitude).

Parameters
addressThe address to geocode.
Returns
A CustomVertex object with the geographic coordinates.
Exceptions
Exceptionif the address cannot be resolved or if an error occurs during the process.

◆ getHTML()

static String ch.routify.revgeocode.RevGeoCode.getHTML ( String urlToRead) throws Exception
inlinestatic

Makes an HTTP GET request to the specified URL and returns the response content as a string.

Parameters
urlToReadThe URL to send the GET request to.
Returns
The response content from the URL as a string.
Exceptions
Exceptionif an error occurs during the HTTP request.

◆ main()

static void ch.routify.revgeocode.RevGeoCode.main ( String[] args) throws Exception
inlinestatic

Main method for testing the reverse geocoding functionality.

Parameters
argsCommand line arguments (not used).
Exceptions
Exceptionif there is an issue with the reverse geocoding process.

◆ resolveRequestAddresses()

static Tuple2< CustomVertex, CustomVertex > ch.routify.revgeocode.RevGeoCode.resolveRequestAddresses ( JSONObject data) throws Exception
inlinestatic

Resolves the request addresses to CustomVertex objects based on the input data.

Parameters
dataA JSONObject containing the request data.
Returns
A Tuple2 containing the resolved start and end CustomVertex.
Exceptions
Exceptionif the addresses cannot be resolved.

The documentation for this class was generated from the following file: