geonames to W3C POI format service

web service::

Request

URL

http://www.rajsingh.org/service/geonamespoi.php

Parameters

key value
lat latitude in decimal degrees
lng longitude in decimal degrees
radius distance in kilometers around which to search for place names
use3d Default is 2D.
Value of 1 = include an elevation value and return a 3D point.
version Version of the W3C POI spec in which to return the response.
Default is the latest (currently http://www.w3.org/2010/POI/documents/Core/core-20110915.html).
Value of 1 = http://www.w3.org/2010/POI/documents/Core/core-20110511.html.

Response

A W3C POI WG XML formatted point.

Example

Request:

http://www.rajsingh.org/service/geonamespoi.php?lng=-71.25&lat=42.3&radius=2

Response:

	<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
	<pois>
	  <poi id="http://geonames.org/4929521">
	    <label>
	      <value>Babson Park, Massachusetts, United States</value>
	      <term>Babson Park</term>
	    </label>
	    <author href="http://www.geonames.org/about.html" type="text/html">
	      <term>primary</term>
	    </author>
	    <license href="http://creativecommons.org/licenses/by/3.0/" type="text/html">
	      <term>CC BY 3.0</term>
	    </license>
	    <category scheme="http://www.geonames.org/export/codes.html">
	      <value>city, village,...</value>
	      <term>P</term>
	    </category>
	    <category scheme="http://www.geonames.org/export/codes.html">
	      <value>populated place</value>
	      <term>PPL</term>
	    </category>
	    <location>
	      <Point>
	        <pos>-71.2595 42.29871</pos>
	      </Point>
	    </location>
	  </poi>
	  <poi id="http://geonames.org/4945063">
	    <label>
	      <value>Needham Heights, Massachusetts, United States</value>
	      <term>Needham Heights</term>
	    </label>
	    <author href="http://www.geonames.org/about.html" type="text/html">
	      <term>primary</term>
	    </author>
	    <license href="http://creativecommons.org/licenses/by/3.0/" type="text/html">
	      <term>CC BY 3.0</term>
	    </license>
	    <category scheme="http://www.geonames.org/export/codes.html">
	      <value>city, village,...</value>
	      <term>P</term>
	    </category>
	    <category scheme="http://www.geonames.org/export/codes.html">
	      <value>populated place</value>
	      <term>PPL</term>
	    </category>
	    <location>
	      <Point>
	        <pos>-71.23283 42.29454</pos>
	      </Point>
	    </location>
	  </poi>
	</pois>