Difference between revisions of "Main Page"
Line 15: | Line 15: | ||
<Response> | <Response> | ||
<Count>1</Count> | <Count>1</Count> | ||
− | '<Code>JNU</Code>' | + | ''<Code>JNU</Code>'' |
<Type>A</Type> | <Type>A</Type> | ||
<Name>Juneau Arpt</Name> | <Name>Juneau Arpt</Name> |
Revision as of 18:54, 31 December 2015
REST Interface Description for Coolgeo.org.
Coolgeo.org offers an easy REST API to to query geo and station data
Contents
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
<Status> <ResponseArray> <Response> <Count>1</Count>JNU
<Type>A</Type> <Name>Juneau Arpt</Name> <CityCode>JNU</CityCode> <CityName>Juneau</CityName> <CountryCode>US</CountryCode> <CountryName>UNITED STATES</CountryName> <StateCode>AK</StateCode> <StateName>ALASKA</StateName> <Latitude>+058.3590</Latitude> <Longitude>-134.5652</Longitude> </Response> <Response> <Count>2</Count>JNU
<Type>C</Type> <Name>Juneau</Name> <CityCode>JNU</CityCode> <CityName>Juneau</CityName> <CountryCode>US</CountryCode> <CountryName>UNITED STATES</CountryName> <StateCode>AK</StateCode> <StateName>ALASKA</StateName> <Latitude>+058.3000</Latitude> <Longitude>-134.4056</Longitude> </Response> <Response> <Count>3</Count>UNU
<Type>A</Type> <Name>Dodge County Airport</Name> <CityCode>UNU</CityCode> <CityName>Juneau</CityName> <CountryCode>US</CountryCode> <CountryName>UNITED STATES</CountryName> <StateCode>WI</StateCode> <Latitude>+058.3000</Latitude> <Longitude>-134.4167</Longitude> </Response> </ResponseArray> <Search Mode="location" Value="Juneau" Found="3"/> </Status>
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