Difference between revisions of "Main Page"

From wiki.coolgeo.org
Jump to navigation Jump to search
Line 2: Line 2:
  
 
Coolgeo.org offers an easy REST API to to query geo and station data<br>
 
Coolgeo.org offers an easy REST API to to query geo and station data<br>
 +
 +
 +
 +
 +
=Search location by search string=
 +
Search location by a string, this could be any meaning, a city, code or country name to be matched
 +
<br><br>
 +
Sample: http://rest.coolgeo.org/xml.cgi?search=location&value=Juneau
 +
  
  

Revision as of 18:52, 31 December 2015

REST Interface Description for Coolgeo.org.

Coolgeo.org offers an easy REST API to to query geo and station data



Search location by search string

Search location by a string, this could be any meaning, a city, code or country name to be matched

Sample: http://rest.coolgeo.org/xml.cgi?search=location&value=Juneau



Station details by code

Show details by Code and return data such as lat, lon, name details, currency, time and others.

Sample: http://rest.coolgeo.org/xml.cgi?show=location&value=syd&type=c

Return example for show=location, value=syd (Sydney) and type=c (Ciity Code)

<Response 
 Code="SYD" 
 Type="C" 
 Name="Sydney" 
 CityCode="SYD" 
 CityName="Sydney" 
 StateCode="NS" 
 StateName="New South Wales" 
 CountryCode="AU" 
 CountryName="AUSTRALIA" 
 ContinentCode="OC" 
 ContinentName="Oceania" 
 Longitude="+151.2062" 
 Latitude="-033.8705" 
 TZCode="AEDT" 
 TZName="Australia/Sydney" 
 Offset="39600" 
 OffsetRnd="+11" 
 CurrentEpoch="0000000000" 
 CurrentDate="DDD MMM DD HH:MM:SS YYYY" 
 isDST="1" 
 CurrencyCode="AUD" 
 CurrencyName="Australian Dollar"
/>

Location details by latitude and longitude

Show details by latitude and longitude is about to return data such as the nearest city, airport, localtime and others.

Sample: http://rest.coolgeo.org/xml.cgi?show=geo&latitude=+37.78848&longitude=-122.3750

Return example for show=geo, latitude=+37.7884, longitude=-122.3750

<Status>
 <Response>
  <TZ 
   Code="America/Los_Angeles" 
   Offset="-28800" OffsetRnd="-8" 
   CurrentEpoch="0000000000" 
   CurrentEpochGMT="0000000000" 
   CurrentDate="DDD MMM DD HH:MM:SS YYYY" 
   CurrentDateGMT="DDD MMM DD HH:MM:SS YYYY" 
   ShortName="PST" 
   isDST="0"
  />
  <NearestStation 
   Code="SFO" 
   Type="C" 
   Name="San Francisco" 
   City="San Francisco" 
   Distance="2" 
   CountryCode="US" 
   CountryName="UNITED STATES"
  />
  <NearestAirport 
   Code="OAK" 
   Type="A" 
   Name="Metro Oakland Intl Arpt" 
   City="Oakland" 
   Distance="16" 
   CountryCode="US" 
   CountryName="UNITED STATES"
  />
 </Response>
</Status>

Station Codes

IATA Codes are used for station data, please get more information here

  • A = Airport
  • B = Bus Station
  • C = City
  • G = Ground Data
  • H = Heli Port
  • R = Railway Station