All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.afrigis.services.package-info Maven / Gradle / Ivy

There is a newer version: 3.0.2
Show 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 - 2024 Weber Informatics LLC | Privacy Policy