Difference between revisions of "Main Page"
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
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> | ||
+ | |||
+ | |||
+ | |||
+ | =Station details by Code= | ||
+ | Show details by Code and return data such as lat, lon, name details, currency, time and others. | ||
+ | <br><br> | ||
+ | Sample: http://rest.coolgeo.org/xml.cgi?show=location&value=syd&type=c | ||
+ | <br> | ||
+ | Return example for code=syd (Sydney) and type=c (Ciity Code)<br> | ||
+ | <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="1451622119" | ||
+ | CurrentDate="Fri Jan 1 05:21:59 2016" | ||
+ | isDST="1" | ||
+ | CurrencyCode="AUD" | ||
+ | CurrencyName="Australian Dollar" | ||
+ | /> | ||
=Location details by latitude and longitude= | =Location details by latitude and longitude= | ||
Line 42: | Line 75: | ||
</Response> | </Response> | ||
</Status> | </Status> | ||
− | |||
=Station Codes= | =Station Codes= |
Revision as of 18:28, 31 December 2015
REST Interface Description for Coolgeo.org.
Coolgeo.org offers an easy REST API to to query geo and station data
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 code=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="1451622119" CurrentDate="Fri Jan 1 05:21:59 2016" 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 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