Folks, GeoNames is a free service that offers geographical information across all countries with a wide coverage of over 8 million placenames. They have a set of useful REST APIs which we can wrap inside an ESB connector for some useful geo queries during a message flow. Please refer to [1] for a full list of available services.
For the first pass, we can implement an ESB connector wrapping the services
listed @ [2].
A couple of points to note...
a. Connector config on the ESB will slightly vary based on the service,
but overall will have a structure similar to the following.
e.g. findNearestPostalCodes
<geonames.postalcodesearch>
<postalCode>9011</postalCode>
<username>geonames-user</username>
<maxRows>10</maxRows>
</geonames.postalcodesearch>
b. This is a free and public service that does not enforce strict
authentication measures. However these services have a daily throttle
limit based on the username, hence IMO we can bring that onto the ESB
configuration level so that the front end callers will not have to worry
about that.
[1] http://www.geonames.org/export/ws-overview.html
[2]
10 findNearby <http://www.geonames.org/export/web-services.html#findNearby>
XML<http://api.geonames.org/findNearby?lat=48.865618158309374&lng=2.344207763671875&fclass=P&fcode=PPLA&fcode=PPL&fcode=PPLC&username=demo&style=full>
JSON 11
findNearbyPlaceName<http://www.geonames.org/export/web-services.html#findNearbyPlaceName>
XML<http://api.geonames.org/findNearbyPlaceName?lat=47.3&lng=9&username=demo&style=full>
JSON 12
findNearbyPostalCodes<http://www.geonames.org/export/web-services.html#findNearbyPostalCodes>
XML<http://api.geonames.org/findNearbyPostalCodes?postalcode=8775&country=CH&radius=10&username=demo&style=full>
JSON 13
findNearbyStreets<http://www.geonames.org/maps/us-reverse-geocoder.html#findNearbyStreets>
(US)XML<http://api.geonames.org/findNearbyStreets?lat=37.451&lng=-122.18&username=demo&style=full>
JSON 14
findNearbyStreetsOSM<http://www.geonames.org/maps/osm-reverse-geocoder.html#findNearbyStreetsOSM>
XML<http://api.geonames.org/findNearbyStreetsOSM?lat=37.451&lng=-122.18&username=demo&style=full>
JSON
17
findNearestAddress<http://www.geonames.org/maps/us-reverse-geocoder.html#findNearestAddress>
(US)XML<http://api.geonames.org/findNearestAddress?lat=37.451&lng=-122.18&username=demo&style=full>
JSON 18
findNearestIntersection<http://www.geonames.org/maps/us-reverse-geocoder.html#findNearestIntersection>
(US)XML<http://api.geonames.org/findNearestIntersection?lat=37.451&lng=-122.18&username=demo&style=full>
JSON
27postalCodeCountryInfo<http://www.geonames.org/export/web-services.html#postalCodeCountryInfo>
XML<http://api.geonames.org/postalCodeCountryInfo?&username=demo&style=full>
JSON<view-source:http://api.geonames.org/postalCodeCountryInfoJSON?formatted=true&&username=demo&style=full>
28postalCodeLookup<http://www.geonames.org/export/web-services.html#postalCodeLookupJSON>
JSON<view-source:http://api.geonames.org/postalCodeLookupJSON?formatted=true&postalcode=6600&country=AT&username=demo&style=full>
29postalCodeSearch<http://www.geonames.org/export/web-services.html#postalCodeSearch>
XML<http://api.geonames.org/postalCodeSearch?postalcode=9011&maxRows=10&username=demo&style=full>
JSON<view-source:http://api.geonames.org/postalCodeSearchJSON?formatted=true&postalcode=9011&maxRows=10&username=demo&style=full>
Any thoughts or comments on this?
Thanks,
Manoj
--
Manoj Fernando
Director - Solutions Architecture
Contact:
LK - +94 112 145345
Mob: +94 773 759340
www.wso2.com
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
