Comments (5)
I've been thinking about addresses and I'm not sure they are as easy as pulling tags from the database. It is quite common practice to only provide a partial address, e.g., addr:housenumer=11, addr:street=Foo Road, addr:postcode=OX2 8JG. Is this enough?
My thoughts, in order of decreasing work, are 1) we do the query server-side and provide the full address in the pop-up 2) we query Nominatim from JS letting the client do the work, 3) we somehow provide a link to an external Nominatim query for the entity, and 4) we just don't display addresses, which seems like a bit of a cop out as the information is probably useful.
I think 1 is the most elegant and robust solution, but it depends whether the extra complexity is worth it. After that I would go for 3, then 2, then 4.
from brewmap.
For reference, it is pretty easy to do an address look-up for a specific entity using a query such as:
http://nominatim.openstreetmap.org/reverse?osm_type=W&osm_id=4728342
We can include "&format=json", to provide a format we can easily use in the client or server.
Probably best to not use "&addressdetails=0" as for pretty rendering of the address we're going to want to line-break on the commas.
from brewmap.
That's neat - I have never tried to use nominatim before - I was about to write a complicated SQL query to try to do the same, extracting the information from the place tags near it. I must add a suburb called 'Stranton' because Foggy Furze is wrong for Cameron's Brewery!
Whether to do this on the server or the client depends on how we implement it - if we are going to run it for all addresses we should do it on the server so it gets done less frequently....on second thoughts, with my database updating every 10 minutes, that is probably less load on nominatim if we do it on the client.
I think the 'best' way is to do it ourselves on our database though if feasible, then we do not load up the main OSM servers with bulk requests.
from brewmap.
In fact, I may just install nominatim on my server - it uses an osm2pgsql database, so I can probably run it on my server.
from brewmap.
Thanks Craig, I have merged your changes in and deployed them.
from brewmap.
Related Issues (20)
- Is the edit button necessary? HOT 2
- JSON data contains keys with null values HOT 3
- Render 'industrial=brewery' rather than 'industry=brewery' HOT 6
- Server code does not read BrewMapCfg.json file
- Map Key is not generated automatically HOT 1
- Statistics Box on main Page is emtpy
- Statistics should be shown as a table to make it neater. HOT 1
- Add layer selector HOT 4
- Improve Microbrewery Icon HOT 4
- Type in popup incorrect HOT 1
- Web Page Layout Percentage Size HOT 2
- Multiple values HOT 1
- Vineyards HOT 1
- Adding support for relations HOT 5
- Use geoJSON for data file format HOT 2
- Improve Scalability of Server Side Code HOT 3
- Show tagQueries on a Map
- Cluster icons to de-clutter map. HOT 3
- Make code more Abstract HOT 1
- Attribution HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brewmap.