News for hackers. Stuff that matters.
Re:Trip planning on Android phone turned off for now by tuukkah on Tuesday November 05, 2019 @01:50AM (#21450266)
Don't depend on Google's APIs. Please use OpenStreetMap data with (and contribute to) OpenMapTiles, OpenTripPlanner, Pelias geocoding etc.
Re:Trip planning on Android phone turned off for now by arnath on Tuesday November 05, 2019 @06:17AM (#21451344)
This 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).

Re:Trip planning on Android phone turned off for now by tuukkah on Tuesday November 05, 2019 @06:40AM (#21451448)
At least Nominatim can answer such queries, for example: 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.

Re:Trip planning on Android phone turned off for now by NetToolKit on Tuesday November 05, 2019 @10:57AM (#21453479)
We at NetToolKit have implemented arnath's requested functionality using OpenStreetMap data (demo available at 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/) and/or are expensive to use (e.g. Foursquare).
Re:Trip planning on Android phone turned off for now by leoedin on Tuesday November 05, 2019 @08:18AM (#21452061)
I think Foursquare offer pretty much exactly that. They pivoted a while ago to focus on B2B location API stuff.
Re:Trip planning on Android phone turned off for now by distances on Wednesday November 06, 2019 @04:50PM (#21467833)
Didn't they just recently pivot to doing place reviews instead of check-ins?
Re:Trip planning on Android phone turned off for now by lucaspiller on Tuesday November 05, 2019 @04:22AM (#21450888)
If 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

[1] https://github.com/lucaspiller/offline-geocoder

Re:Trip planning on Android phone turned off for now by tuukkah on Tuesday November 05, 2019 @04:39AM (#21450957)
As far as I know, GeoNames has been surpassed by Who's On First that e.g. Pelias employs: https://www.whosonfirst.org/
Re:Trip planning on Android phone turned off for now by zeta0134 on Tuesday November 05, 2019 @03:20AM (#21450595)
So 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.
Re:Trip planning on Android phone turned off for now by jakecopp on Tuesday November 05, 2019 @03:44AM (#21450706)
> 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).

Re:Trip planning on Android phone turned off for now by LunaSea on Tuesday November 05, 2019 @06:15AM (#21451334)
Having 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.

Re:Trip planning on Android phone turned off for now by yorwba on Tuesday November 05, 2019 @07:31AM (#21451769)
Are 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%... , 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%...

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 .
  }
Re:Trip planning on Android phone turned off for now by tuukkah on Tuesday November 05, 2019 @07:12AM (#21451655)
Typically, 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...

EDIT: Applied the fix by yorwba to get more results.

Re:Trip planning on Android phone turned off for now by yorwba on Tuesday November 05, 2019 @07:40AM (#21451825)
You 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...

Conclusion: it depends on how you count.

Re:Trip planning on Android phone turned off for now by tuukkah on Tuesday November 05, 2019 @07:43AM (#21451838)
Thanks for noticing and fixing my bug!
Re:Trip planning on Android phone turned off for now by ocdtrekkie on Tuesday November 05, 2019 @08:21AM (#21452090)
The 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.
Re:Trip planning on Android phone turned off for now by LunaSea on Tuesday November 05, 2019 @11:21AM (#21453761)
Sure, 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.

Re:Trip planning on Android phone turned off for now by sp332 on Tuesday November 05, 2019 @07:59AM (#21451942)
It varies a lot by location. Some places are kept up to date by contributors and some aren't.
Re:Trip planning on Android phone turned off for now by izacus on Tuesday November 05, 2019 @03:26AM (#21450620)
So do you think OSM servers are free to run and won't have to be paid for?
Re:Trip planning on Android phone turned off for now by rathel on Tuesday November 05, 2019 @03:44AM (#21450707)
OSM 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).

Re:Trip planning on Android phone turned off for now by CalRobert on Tuesday November 05, 2019 @04:29AM (#21450921)
OSM 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

Re:Trip planning on Android phone turned off for now by donkeyd on Tuesday November 05, 2019 @06:41AM (#21451449)
I 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.