Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/andreasscherbaum/pg_arcgis

Reach out to ArcGIS web service from PostgreSQL or Greenplum
https://github.com/andreasscherbaum/pg_arcgis

arcgis geocoordinates greenplum greenplum-database lookup postgresql resolve-geocoordinates reversegeocode sql

Last synced: about 1 month ago
JSON representation

Reach out to ArcGIS web service from PostgreSQL or Greenplum

Awesome Lists containing this project

README

        

PostgreSQL/Greenplum & ArcGIS

#######################################################################
Abstract:

This plugin provides functionality to reach out from a PostgreSQL or
Pivotal Greenplum Database to an ArcGIS system, to request and enrich data.

#######################################################################
Installation:

make install

#######################################################################
Deinstallation:

make remove

#######################################################################
Requirements:

You need: ArcGIS "Client ID" & "Client Secret". You can create this by
logging in into the ArcGIS website with your account and create an application.
Basic lookups and reverse lookups are free and don't require account details.

#######################################################################
Configuration:

- verify configuration

SELECT arcgis.check_configuration();

- set ArcGIS client ID

SELECT arcgis.set_client_id('');

- set ArcGIS client secret

SELECT arcgis.set_client_secret('');

- set ArcGIS authentication URL

SELECT arcgis.set_auth_url('');

- set ArcGIS geocode URL

SELECT arcgis.set_geocode_url('');

- remove existing configuration

SELECT arcgis.remove_configuration();

#######################################################################
Usage:

- resolve address to geocoordinates

SELECT arcgis.find('

');

Example: SELECT arcgis.find_return_point('380 New York Street Redlands CA 92373');

- resolve address to geocoordinates, return x (longitude) and y (latitude) as array

SELECT arcgis.find_xy('

');

Example: SELECT arcgis.find_xy('380 New York Street Redlands CA 92373');

- resolve address to geocoordinates, return y and x as array, suitable for services like Google Maps

SELECT arcgis.find_xy('

');

Example: SELECT arcgis.find_xy('380 New York Street Redlands CA 92373');

- resolve geocoordinates to closest address

SELECT arcgis.reverseGeocode('', '');

Example: SELECT arcgis.reverseGeocode('-122.148659529', '37.3939849106');
Example: SELECT * FROM arcgis.reverseGeocode('-122.148659529', '37.3939849106');

- resolve geocoordinates to closest address, return address as string

SELECT arcgis.reverseGeocode_string('', '');

Example: SELECT arcgis.reverseGeocode_string('-122.148659529', '37.3939849106');