Reputation: 8913
I'm developing a geo-location service which requires a photo per POI, and I'm trying to figure out how to match the right photo to a given location.
I'm looking for an image that will give an overview for the location rather than some arbitrary image from a given coordinate.
for example when searching for "nyc" in Google you get the following image, filtered out from http://www.filmsofcrawford.com/talesofnyctours/
Of course Google is Google, however I've found this similar approach on other sites , for example : https://roadtrippers.com/us/san-francisco-ca/attractions/conservatory-of-flowers?lat=37.81169&lng=-122.69478&z=11&a2=p!5
Q: For an index like [POI NAME] -> [Overview image URL]
, what would be your approach, (crawling, an API etc') ?
Please add your thoughts :)
Upvotes: 12
Views: 490
Reputation: 6276
I would highly suggest using an existing API. Matching images with locations is quite hard to achieve. To my point of view the Google Images search API gives too many irrelevant results. It's built that way, processing images based on metatags or bringing up results ranked by SEO ranking.
If you still considering building up a web crawler take a look at Scrapy , it's open source, well documented and pretty stable.
You should take a look at other open APIs providing a location based queries. Some examples are following:
Upvotes: 3
Reputation: 1201
Writing your own image crawler would not be an easy task. What happens if your target sites change their format, terms of use, or take down links, or even replace an image altogether? There's a great answer on Quora regarding the complexity of web crawlers, and even if you simplify things by narrowing down your sources to a small list of sites, you'll have to figure out how to process images, not text, and that might entail having to save hundreds of images locally for processing, which won't be fun to maintain.
I would strongly suggest leveraging Google's image search API to do the heavy 'technical lifting' for you. Your job is then to find the right combination of filters that will get you the best results. Here are some to consider:
Upvotes: 3
Reputation: 3978
Of course you don't need to crawl the web for this. You can use an API from google to search for images and retrieve the image. Take a look at this article
Upvotes: 0