Archive for the ‘PlaceMaker’ Category

Reverse geocoding is down due to popular demand.

Sunday, April 18th, 2010

Unfortunately the reverse geocoding services I provide is down as there are too many incoming request. This resulted in Yahoo services blocking the requests coming from my servers. When I wrote this service I never thought that it would be so popular as I wrote it has some sort of hack. But a few month done the line and there are about 500 000 requests per month.

If you are still interested in reverse geocoding your long/lats I published the source code used for the reverse geocoding service in github http://github.com/geomojo/ReverseGeocoder.

The recommanded solution for reverse geocoding to WOEID is by using the Flickr API flickr.places.findByLatLon.html

This can also be done using the YQL language:

http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20flickr.places%20where%20lon%3D-97.470929%20and%20lat%3D37.510042&diagnostics=true

Where the lon and lat parameters contains the lat/long you want to reverse geocode into a WOEID.

Woeid’s altitude service.

Sunday, January 3rd, 2010

Was reading Geonames Api Documentations and a service providing elevation data from the Aster Global Digital Elevation Model on tiles of 30m x 30 m. The only problem with this services was that it only took long/lats. I wrote a small wrapper providing this service for WOEID (http://www.geomojo.org/cgi-bin/getaltitude.cgi).

To get the elevation of a point just call the service with either the ‘woeid’ parameter or the ‘long’ and ‘lat’ parameters.

http://www.geomojo.org/cgi-bin/getaltitude.cgi?woeid=44418:

<altitudepoint>
<woeid>44418</woeid>
<long>-0.127140</long>
<lat>51.506321</lat>
<altitude>21</altitude>
</altitudepoint>

http://www.geomojo.org/cgi-bin/getaltitude.cgi?long=-0.27140&lat=51.506321:

<altitudepoint>
<woeid>26352796</woeid>
<long>-0.271400</long>
<lat>51.506321</lat>
<altitude>22</altitude>
</altitudepoint>

You can also select the output format by using the ‘format’ parameter. The only supported format are JSON and XML

I also added an extra functionality that returns the elevations between two points. This services could be useful to view the relief between two points of course the distance between the points should be much great than 30 m.

This service take two points either WOEID’s or long/lats and an extra stepping parameters.

http://www.geomojo.org/cgi-bin/getaltitude.cgi?fromWoeid=44418&toWoeid=26352796&steps=5:

<altitudepoints>
<altitudepoint>
<woeid/>
<long>-0.127140</long>
<lat>51.506321</lat>
<altitude>21</altitude>
</altitudepoint>
<altitudepoint>
<woeid/>
<long>-0.156974</long>
<lat>51.509502</lat>
<altitude>27</altitude>
</altitudepoint>
<altitudepoint>
<woeid/>
<long>-0.186808</long>
<lat>51.512684</lat>
<altitude>28</altitude>
</altitudepoint>
<altitudepoint>
<woeid/>
<long>-0.216642</long>
<lat>51.515865</lat>
<altitude>16</altitude>
</altitudepoint>
<altitudepoint>
<woeid/>
<long>-0.246476</long>
<lat>51.519047</lat>
<altitude>9</altitude>
</altitudepoint>
<altitudepoint>
<woeid/>
<long>-0.276310</long>
<lat>51.522228</lat>
<altitude>47</altitude>
</altitudepoint>
</altitudepoints>

Here are the list of parameters for this service:

  • woeid: the woeid of the place for which the elevation is needed
  • long: the longitude of the place for which the elevation is needed
  • lat: the latitude of the place for which the elevation is needed
  • format: the output format of the service supports JSON or XML
  • fromWoeid, toWoeid: the WOEID’s of the places for which the list elevations are needed
  • fromLong: the longitude of the place from which the list of elevations are needed.
  • fromLat: the latitude of the place from which the list of elevations are needed.
  • toLong: the longitude of the place to which the list of elevations are needed.
  • toLat: the latitude of the place to which the list of elevations are needed.
  • steps: Numbers of samples between the two points provided.

Reverse Geocoding to woeids

Monday, November 23rd, 2009

With twitter providing trend search base on woeids. I started to look at what geotagging twitter provided for its tweets. I soon noticed that there were only providing long/lats of the user location. It would be useful to have the woeid associated to these long/lats. This is why I implemented a simple service returns geo-informations associated to the long/lats.

The services is located at http://www.geomojo.org/cgi-bin/reversegeocoder.cgi and only take 3 parameter one of which is Optional.

  • long: The longitude of the point you want to reverse geocode.
  • lat  : The latitude of the point you want to reverse geocode.
  • format : Optional parameter used to indicate which format you want to be returned by the service. The supported formats are JSON and XML. XML being the default format provided.

To reverse geocode I use the functionality provided by Placemaker. Placemaker handles micro-formats and the returns the location associated to the long/lats in the micro-format. My services just uses this functionality by wrapping the long/lats given in a micro format and submitting it to Placemaker. At the moment the smallest entity returned by the service are zips.

Here is the output of the service for a given long/lat:

http://www.geomojo.org/cgi-bin/reversegeocoder.cgi?long=-97.470929&lat=37.510042

<place>
<woeid>12787085</woeid>
<name>67026</name>
<type>Zip Code</type>
</place>

Geo-Tagging Twitter Messages V2

Tuesday, October 20th, 2009

I’ve been doing some extra work on the Geo Tweets I implemented. I now use Google’s language Detection tools to determine the language of the tweet so that placemaker produces better results. This will avoid having for example Mich (Michigan) being recognized as a place in German tweets.

I also made added most popular places tweeted about during the last day, week or month. These can be seen in the following page: http://www.geomojo.org/cgi-bin/geotweets.cgi

There are still some problem with false positive (words that have falsely been tagged as being a location) in languages that are not supported by placemaker. The most common of the false positive I’ve seen so far is Kan in Indonesian.

Geo-Tagging Tweets

Thursday, September 24th, 2009

I finally finished a mash up using Placemaker to find locations in tweets. The results are then stored to be be queried on via a map or via a simple search box. This will enable to find what people write about specific locations.

There are two pages:

The first page http://www.geomojo.org/cgi-bin/map.cgi which contains a map with tweets makers where clicking on these markers prints the tweets associate to the locations. The markers are clustered using the following hierarchy Country,  State, County, Locality.

map

The second page http://www.geomojo.org/cgi-bin/geotweets.cgi just contains a search box. Provide the location wanted and the tweets for this locations will be display.

geotweets

New GeoMineSweeper functionality.

Tuesday, August 11th, 2009

At last got time to work on this a bit more. It is now possible to send potential location of mine via direct messaging. This will avoid overcrowding your twitter page. You will still receive the response via the usual reply system.

Welcome to this new blog of Geo magic

Thursday, July 16th, 2009

Lets start our first post with something I implemented using PlaceMake, GeoPlanet and Twitter.

I called it GeoMineSweeper. It is a basically a MineSweeper where the minesgeominesweeper are located in places around the world. To play this game you just need to reply to GeoMineSweeper with a location you think a mine might be in. GeoMineSweeper will then reply with information on whether you found a mine or not. If you haven’t found a mine the reply will contain the distance to the closest mine.

Next step for this game is to also accept direct message. Once this has been done I will start playing with the maps api. To give player a way to find mines locations more easily.