
com.afrigis.services.package-info Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core Show documentation
Show all versions of core Show documentation
Core Java library to ease use of AfriGIS Services
The newest version!
/**
*
* AfriGIS Services
*
*
*
* Quick Start
*
*
* Geocoding
*
*
import com.afrigis.services.AfriGISServices;
import com.afrigis.services.ServiceCallFactory;
import com.afrigis.services.geocode.GeocodeResponse;
import com.afrigis.services.Address;
import com.afrigis.services.impl.Coordinate;
import com.afrigis.services.ConfidenceLevel;
public class Example {
public static void main (String [] args) {
ServiceCallFactory factory = AfriGISServices.instance("Key", "Secret");
GeocodeResponse addressResponse = factory.get( (GeocodeParamatersImpl.build("446 Rigel") ) );
List<Address> addresses = addressResponse.listResults();
Address firstMatch = addresses.get(0);
Coordinate coordinate = address.getLocation();
String formattedAddress = firstMatch.getAddress();
ConfidenceLevel confLevel = address.getConfidence();
String seoid = address.getSeoid();
}
}
*
*
* Reverse Geocoding
*
*
import com.afrigis.services.AfriGISServices;
import com.afrigis.services.ServiceCallFactory;
import com.afrigis.services.reversegeocoding.ReverseGeocodeParameters;
import com.afrigis.services.reversegeocoding.impl.ReverseGeocodeParametersImpl;
import com.afrigis.services.reversegeocoding.ReverseGeocodeAddress;
public class Example {
public static void main (String [] args) {
ServiceCallFactory serviceFactory = AfriGISServices.instance("Key","Secret");
ReverseGeocodeParameters request = new ReverseGeocodeParametersImpl(-25.806426f,28.248292f);
ReverseGeocodeResponse response = serviceFactory.get(request);
for (ReverseGeocodeAddress address : response.listResults()) {
//Do something with the results!!
}
}
}
*
* @author hendrikc
*
*/
package com.afrigis.services;
© 2015 - 2025 Weber Informatics LLC | Privacy Policy