Archive for the ‘API’ Category

(Google) GeoWeb Search API

Wednesday, May 14th, 2008

I dont know when it happened, but the API to search Googles GeoIndex seems to have gone live. The documentation is here (http method) and here (javascript). I actully found this via the recently announced Google Maps API for Flash, which is also good.

/me wanders off to play (but dont have much time at the moment :( )

but before I go, I note that the api doesn’t appear to offer KML output :p

… unless of course the actual GeoSearch API is something bigger!

update: try it out:

http://www.nearby.org.uk/google/geoweb_explorer.php

Not much to look at, but does show the json in a slightly easier to read format. Of course need to make a Maps API based map to try it out, but not tonight… (but did get as far as KML output – with source code!)

update2: Its been formally announced! (also if you find the ‘blended’ doesnt return results you expect, see this thread

Bah, Spam!

Monday, March 24th, 2008

(appologies all, this post is simply a rant, and unfortunatly will almost certainly not reach the people its intended for!)

I just noticed that despite only having a very soft launch via this blog, already gokml.net* has attacted submission bots, which seems to have the sole purpose of seeking out submission forms and sending in their masters details, I guess in the hope of getting that little bit of search engine juice.

I guess need to roll out a captcha and/or email confirmation, or maybe even akismet.com?

(as a sidenote, I have a really old form that was intended for people to submit sites for a geoindex, in the nearby location search, I dont think its even linked anymore but it still gets hundreds of submissions daily, I’ve kept it open basically as a honey pot, but unsure what to do with the data, suggestions on a postcard…)

(* a ‘tinyurl’ site for creating network-links for KML content – must also get round to finishing it off…)

Where in the world are people looking? part 2

Saturday, March 1st, 2008

Following part 1 yesterday, have now plotted some maps per individual service.

Flash Earth Layer

Conclusions

  1. Google Earth does request a link for the initial view on startup – that point in the Atlantic.
  2. I guess North American installs have two slightly different default placemarks; has it changed, or maybe Canada gets a different one?
  3. But that doesnt explain the lines from there – people must have their links set to periodically refresh?
  4. Germany likes FlashEarth (or rather people like looking at Germany with FlashEarth link enabled)
  5. Many people leave the links open even when not in use – e.g. the British Isles links show worldwide usage, notably over Russia.
  6. MGRS notably has high usage in two areas.
  7. The Far east likes to know what direction they facing.

Update: In a total forehead slapping momont realised these unprojected whole world images, are exactly what is used in GroundOverlays, so the the pages now include links to view the higher resolution images directly in Google Earth, duh!

Example: View In Google Earth (don’t forget to try adjusting the tranparency slider!) [Update, to fix broken link, sorry!]

Geohash converter; API limit upped

Thursday, February 28th, 2008

Recently geohash.org was released; the premise: short easy links that encode a location. The website offers instant conversion, but as the algorithm is Public Domain, Lordelph was quick to implement a php class, and I could quickly add the conversion to my existing conversion API. Convert a postcode to geohash anyone?

Updating the documentation noticed the API was last updated in 2005 – gulp, how time flies! Anyway as a celebration have upped the throttling on the API, now three times the previous limit. Running on much improved hardware than when it was launched so maybe the limit can be tweaked even more, will run some analysis of its impact – it already seems the API is a minor part of the overall load on the server – particularly against the Google Earth layers.

(static) Google Maps in Google Earth…

Thursday, February 21st, 2008

Now that Google have just announced a brand spanking new NON JS Maps API, to be able to display maps with a simple img tag, similar to the Chart API. Well I thought it would be fun to re-purpose the
FlashEarth code to create a network link to display Google Maps in a popup balloon on Google Earth. Not totally sure the utility, but sure is fun (until the novelty wears off!)

Open in Google Earth

Hopefully needless to say the map inside the balloon is static and non draggable.

Update to clarify: You get to draw 1,000 maps daily, which is probably plenty, but go over that and the maps will stop working for you.

Update: as alluded to in the official post, you can use the static API to load a quick map, while the rest of the page loads, then at the last minute change it into a dynamic map. A series of demos showing various ways of lazy loading!

Playing with (geo-enabled) Full-Text Searches

Thursday, December 20th, 2007

Recently I have been playing a lot with Sphinx full-text search engine, in particular with regard to indexing the Geograph archive. (a bit of background – Geograph has a fairly good homegrown site text search – but its not full text, so many queries will not return that many results – not to mention been based on MySQL ‘like’, so is pretty slow – so a full text search is the next level). And I have to say I am liking it a LOT, in fact I would say I am a fanboy :)

So to that end of created a whole bunch of demos based around the flexible indexing it provides, location based searching is even possible!

At the most basic is simple text based search, one point of note, there is no pagination, simply add more keywords (including negative) or grid references to refine the selection.

Next is a ‘auto-complete’ style image finder, this is designed to find ‘that image’ quickly, in a similar way to the above but shows the results in a autocomplete box immediately!

A refinement of the first is search with location, this allows you limit the search to near a particular Grid References – this is particully cool in that there is Sphinx powered auto-complete for place names for finding GRs. (a real auto-complete not a like the search in the previous one pretending to be one)

This is all building towards the Illustrator demo. Which from a block of text attempts to find relevent images. The idea is that a (geolocated) news article, walking route, place description and such could be automatically have relevent(ish) images shown. (an example demo here)

(a few more ‘toys’ can be found in GeographTools!)…. Try them out and let me know how you get on…

I have learnt a lot about search indexing from this, including how to perform location searches in the index (I know latest versions of sphinx include a lat/long based geosearch – but I think this r-tree method in text has better scalability), and how to create an autocomplete function with sphinx. If anybody is interested in these, they will eventually make it into the geograph codebase, or let me know and I might make a separate post.

Interestingly (huh?), it was actually creating a ‘autocomplete’ textbox for finding trigpoints (which included the forerunner to the sphinx location search in but implemented in mysql), is actually what inspired me to actually go the trouble if figuring out how to install Sphinx on linux, which I have been interested in for a long time! – that is also now sphinx powered for text searches :)

As a side note have now reached the ‘linux sysadmin’ level that I can compile it on Geographes servers, yay! But I do worry for the sanity of others due to this (a little knowledge is a dangerous thing!)

Google will Geocode UK addresses and postcodes!

Friday, July 6th, 2007

Something we wondered if we would ever see, but it seems the Google Maps API geocoder will now Geocode UK Addresses and Postcodes (see update below). This is quite big news on many fronts, as traditionally UK geocoding is expensive, or where providers do geocoding its with restictions on use of the data commercially. But the API geocoder positivly encourages caching the geocodes for your locations (POIs), and in with particular Postcodes this has been a big no no. Can’t see any change in ToU’s in light of this, but we will see.

Has Google taken over the Royal Mail too now?

(the official announcement)

Update Nov ’07: … well it seems the postcodes was only a dream, and have now been withdrawn! Time will tell if this can be rectified. Ho hum…

Update Dec ’07: … the ToU have now been updated to clarify that the (http) geocoder is for the express use of ‘pre-caching’ geocodes for use on a Google Maps API map. (I’ve also clarified the above paragraph in regards to this). This also prevents some interesting uses, eg store locators that work before a map is shown (but an intereactive one with a map should be fine), which is a shame.

…updates, updates, updates …

Thursday, July 6th, 2006

After a comparatively quiet period, have finally begun some development work again on these sites, so far: The Nearby API now has a SOAP interface. And two new features for Google Earth: IARU Locator Echo and Worldwide MGRS Grid-lines Layer.
Oh and deformedweb.co.uk is now hosted on the same dedicated server as this site, should mean can do more there….

Ireland support

Monday, May 1st, 2006

It seems there was few issues with Northern Ireland Postcodes, the Coordinate converter and API should both handle them properly. As well as adding support to the Maps section.

Downloads from nearby

Sunday, April 2nd, 2006

Slightly fearing for my bandwidth ;) I have put up a page listing a few of the downloads available from nearby.org.uk. The list is likly to grow as I tidy up more of the data held around this site….