4 ms·
Don't depend on Google's APIs. Please use OpenStreetMap data with (and contribute to) OpenMapTiles, OpenTripPlanner, Pelias geocoding etc.
by tuukkah 7y ago
Don't depend on Google's APIs. Please use OpenStreetMap data with (and contribute to) OpenMapTiles, OpenTripPlanner, Pelias geocoding etc.
- zeta0134 7y agoSo I've tried to use OpenStreetMap but it's hard to ditch the business directory that Google Maps has built in. Are you aware of any open source / crowd sourced directory of physical businesses? It seems like such a thing could exist but I don't know what all is out there.
- jakecopp 7y ago> Are you aware of any open source / crowd sourced directory of physical businesses Yep that's OpenStreetMap! You could use Pelias for geocoding, OSM for the data. Why not offer for users to add the business to OSM if it doesn't exist? I think Foursquare also has a directory, I'm not sure what their costs are though (and closed of course).
- LunaSea 7y agoHaving investigated the use of OpenStreetMap data in the past year, I have to say that it's still disappointing and not complete enough to be used as a serious solution. If I look at university nodes that have a website in France I find 241 unique values which represents less than 10% of the total amount.
- tuukkah 7y agoTypically, there is no perfect data source and their applicability depends on your use cases. OpenStreetMap is first about streets, then (geometries of) buildings, POIs etc. An attribute like website information has not been high on the use cases that the community has but I think this is getting better with more use and especially the integration with Wikidata. In Wikidata, I can currently get 563 results for institutes of higher education in France with website information: https://query.wikidata.org/#SELECT%20DISTINCT%20%3Fschool%20%3FschoolLabel%20%3Fwebsite%20WHERE%20%7B%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%20%20%3Fschool%20wdt%3AP31%2Fwdt%3AP279%2a%20wd%3AQ38723.%0A%20%20%3Fschool%20wdt%3AP17%20wd%3AQ142.%0A%20%20%3Fschool%20wdt%3AP856%20%3Fwebsite.%0A%7D%20%0ALIMIT%201000 https://query.wikidata.org/#SELECT%20DISTINCT%20%3Fschool%20... EDIT: Applied the fix by yorwba to get more results.
- yorwba 7y agoYou need to add an asterisk after wdt:P279, otherwise the query only finds instances of direct subclasses of Q38723. On the other hand, I didn't think to filter only for those that have an associated website. (See sibling comment.) Modifying your query, I get 563 results: https://query.wikidata.org/#SELECT%20DISTINCT%20%3Fschool%20%3FschoolLabel%20%3Fwebsite%20WHERE%20%7B%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%20%20%3Fschool%20wdt%3AP31%2Fwdt%3AP279%2a%20wd%3AQ38723.%0A%20%20%3Fschool%20wdt%3AP17%20wd%3AQ142.%0A%20%20%3Fschool%20wdt%3AP856%20%3Fwebsite.%0A%7D%20%0ALIMIT%201000 https://query.wikidata.org/#SELECT%20DISTINCT%20%3Fschool%20... Conclusion: it depends on how you count.
- tuukkah 7y agoThanks for noticing and fixing my bug!
- yorwba 7y agoAre you sure there are more than 2410 universities in France? Running the SPARQL query below at https://query.wikidata.org/#SELECT%20%28count%28DISTINCT%20%3Fschool%29%20AS%20%3Fcount%29%0AWHERE%0A%7B%0A%20%20%20%20%23%20find%20instances%20of%20subclasses%20of%20university%20Q3918%20%28use%20Q38723%20for%20higher%20education%20institution%29%0A%09%3Fschool%20wdt%3AP31%2Fwdt%3AP279%2a%20wd%3AQ3918%20.%0A%0A%20%20%20%20%23%20in%20France%0A%09%3Fschool%20wdt%3AP17%20wd%3AQ142%20.%0A%7D https://query.wikidata.org/#SELECT%20%28count%28DISTINCT%20%... , I get 218 French universities with a Wikidata item (which usually means there's a corresponding Wikipedia article) but for "higher education institution" I get 675: https://query.wikidata.org/#SELECT%20%28count%28DISTINCT%20%3Fschool%29%20AS%20%3Fcount%29%0AWHERE%0A%7B%0A%20%20%20%20%23%20find%20instances%20of%20subclasses%20of%20higher%20education%20institution%20%28use%20Q3918%20for%20university%29%0A%09%3Fschool%20wdt%3AP31%2Fwdt%3AP279%2a%20wd%3AQ38723%20.%0A%0A%20%20%20%20%23%20in%20France%0A%09%3Fschool%20wdt%3AP17%20wd%3AQ142%20.%0A%7D https://query.wikidata.org/#SELECT%20%28count%28DISTINCT%20%... Query: SELECT (count(DISTINCT ?school) AS ?count) WHERE { # find instances of subclasses of university Q3918 (use Q38723 for higher education institution) ?school wdt:P31/wdt:P279* wd:Q3918 . # in France ?school wdt:P17 wd:Q142 . }
- sp332 7y agoIt varies a lot by location. Some places are kept up to date by contributors and some aren't.
- ocdtrekkie 7y agoThe chicken and egg problem is that OSM will be as good as the data it gets, and the data it gets will increase as people use it as a serious solution and contribute where they find it inadequate.
- LunaSea 7y agoSure, but companies have the money to contribute a subscription but not time, because the later is incredibly more expensive for them. This makes OSM data a non-starter in most serious business use cases.
- izacus 7y agoSo do you think OSM servers are free to run and won't have to be paid for?
- rathel 7y agoOSM source data is not the same thing as infrastructure owned by OSM Foundation. You can self host maps based on OSM with much flexibility (Though Mapbox is easier to use and now has easy-to-grasp pricing that also doesn't discriminate use cases). Yeah, freeriders are a problem for OSMF raster map tile servers, but there is now no excuse not to use any of the above two solutions (self hosting or 3rd party APIs).
- CalRobert 7y agoOSM is data, not servers, which is why a number of companies use OSM data and give you the ability to pay them to use their servers. Thunderforest, for instance. But the point is that you can use the same data they use to make your own tile server if you like. And if you update the OSM data we will all benefit
- lucaspiller 7y agoIf you don't need street-level geocoding, the GeoNames [0] project providers their data free of charge (attribution required). It provides city and district level data, which is suitable for tasks such as displaying the location name of photos or rental listings. Self plug: I wrote a Node library a few years ago to use this data offline. It builds a SQLite database, which is small enough to be suitable for embedding into applications. [1] [0] http://download.geonames.org/export/dump/readme.txt http://download.geonames.org/export/dump/readme.txt [1] https://github.com/lucaspiller/offline-geocoder https://github.com/lucaspiller/offline-geocoder
- tuukkah 7y agoAs far as I know, GeoNames has been surpassed by Who's On First that e.g. Pelias employs: https://www.whosonfirst.org/ https://www.whosonfirst.org/
- arnath 7y agoThis seems like a reasonable place to ask this: Is there an alternative available to Google Places Text Search? E.g., I provide a query that's something like "hardware stores" and a location and I get back a list of hardware stores within the location? As far as I can tell, the geocoding APIs from stuff like MapBox or Pelias aren't intended for this use case (more like finding a specific hardware store).
- tuukkah 7y agoAt least Nominatim can answer such queries, for example: https://nominatim.openstreetmap.org/search.php?q=hardware+stores+in+san+francisco https://nominatim.openstreetmap.org/search.php?q=hardware+st... I don't think it would be difficult to implement in Pelias either considering that it already has the necessary data and can search for results closest to a given point or within an area.
- NetToolKit 7y agoWe at NetToolKit have implemented arnath's requested functionality using OpenStreetMap data (demo available at https://www.nettoolkit.com/geo/autocomplete https://www.nettoolkit.com/geo/autocomplete). The problem that we have found is that while some categories have great coverage (e.g. restaurants in Portland), many categories do not (e.g. gas stations). Assembling this data is expensive, and hence either the data is available via well-capitalized players (e.g. Facebook Places Search: https://developers.facebook.com/docs/places/web/search/ https://developers.facebook.com/docs/places/web/search/) and/or are expensive to use (e.g. Foursquare).
- leoedin 7y agoI think Foursquare offer pretty much exactly that. They pivoted a while ago to focus on B2B location API stuff.
- distances 7y agoDidn't they just recently pivot to doing place reviews instead of check-ins?
- donkeyd 7y agoI got a presentation by Google on API management last week and was surprised that someone thought they'd be a good example on the subject.