[OSM-talk] Proximity

Pierre Béland pierzenh at yahoo.fr
Sun Sep 30 00:24:59 UTC 2018


Solutions depend how big is your data.  Overpass count function might be the solution if just a one shot calculation.  You would have a query for each type.

If you want to use the power of SQL databases, Sqlite is a «light solution», coupled with the DBeaver database tool.https://dbeaver.io/
I used to parse OSM xml with a Python script, but PostgreSQL + PosGIS offers more long term development options like for the Quality analysis I did on Building geometries (https://opendatalabrdc.github.io/Blog/index.html#!Database_Quality_Analysis_Tasking_Manager.md).  Osmosis (Osm2Pgsql schema) takes care to import OSM/Xml directly in a PostGIS database. From there, quite easy to count, filter, analyze data.
 
Pierre 
 

    Le samedi 29 septembre 2018 20 h 02 min 10 s HAE, john whelan <jwhelan0112 at gmail.com> a écrit :  
 
 Thank you kind sir.  I've got sidetracked into trying to count types of buildings.
I used to use VB not for its power but for its development interface.  So much easier than using assembler which I started with many years ago.
Apparently I need a datatable to sort a couple of columns, fine but all the documentation is for C#.  It still has the nice development interface but there are differences.
I know exactly what I want to do but finding the correct syntax makes me feel if you know Perl and it can do the job stay with it.
Thanks John
On Sat, 29 Sep 2018, 6:26 pm Frederik Ramm, <frederik at remote.org> wrote:

Hi,

On 29.09.2018 01:59, john whelan wrote:
> I thank Fredrick for his comments as well.  If a more refined solution
> is required then there is enough information given to make a start coding.

I know Perl isn't what people use these days but just to show that it
really isn't rocket science (and doesn't require elaborate routing
engines for that scale) I've made a modified version of the Perl script
and checked it into the SVN directory. That script will take a .osm data
file as input and generate a schematic map like

http://www.remote.org/frederik/tmp/ipswich-busstops.png

(which depicts Ipswich), where nodes are coloured according to their
distance from the nearest bus stop (in this picture, 500 Mercator metres
or more means something gets red).

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frederik at remote.org  ##  N49°00'09" E008°23'33"


_______________________________________________
talk mailing list
talk at openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk

_______________________________________________
talk mailing list
talk at openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk
  
-------------- section suivante --------------
Une pièce jointe HTML a été nettoyée...
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20180930/ea7d1112/attachment.html>


More information about the talk mailing list