Re: [OSM-dev] PostGIS query "Crossing ways"

2016-09-12 Thread Paul Norman

On 9/12/2016 9:56 AM, Mike N wrote:
I did use the --slim option when importing, and see the node table, 
but I don't see topology in a direct table view.


The ways table has node membership information. Joining the table on 
w1.nodes && w2.nodes and differing way IDs will find ways that share 
nodes. You'll need to define your requirements more precisely than this 
and use something more sophisticated, but this should get you started.


  If I use something like the extension  postgis_topology , would I 
still need to write a tool to populate from OSM data? 


I'm not aware of any tools which import using postgis topology. You 
might be able to do what you want with pgrouting and osm2pgrouting, but 
I haven't used it myself.


___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] PostGIS query "Crossing ways"

2016-09-12 Thread Mike N

On 9/11/2016 3:52 PM, Paul Norman wrote:

PostGIS databases do not have topology so there is no notion of
connected linestrings. You can tell if two ways cross each other with
ST_Intersects, and you can tell if two share points by turning the
linestrings into points, but this doesn't tell you if the two share
nodes. If you want that you need either the osm2pgsql slim tables,
pgsnapshot, or some other schema with node information or topology.


I did use the --slim option when importing, and see the node table, but 
I don't see topology in a direct table view.


  If I use something like the extension  postgis_topology , would I 
still need to write a tool to populate from OSM data?



___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


[Potlatch-dev] [OpenStreetMap] #5421: Sidewalks set to Both

2016-09-12 Thread OpenStreetMap
#5421: Sidewalks set to Both
---+
 Reporter:  ser22  |  Owner:  potlatch-dev@…
 Type:  defect | Status:  new
 Priority:  minor  |  Milestone:
Component:  potlatch2  |Version:
 Keywords: |
---+
 When I click on
 {{{
 Walk > Sidewalks: Both
 }}}

 it sets the value to
 {{{
 (both)
 }}}

 When I click the drop-down again it says
 {{{
 Unknown(both)
 }}}

--
Ticket URL: 
OpenStreetMap 
OpenStreetMap is a free editable map of the whole world

___
Potlatch-dev mailing list
Potlatch-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/potlatch-dev


Re: [OSM-dev] PostGIS query "Crossing ways"

2016-09-12 Thread Tomas Straupis
2016-09-11 18:20 GMT+03:00 Mike N :
> Given a PostGIS database populated from OSM data by osm2pgsql, and 2 sets of
> lines  (such as the selection of all footways and the selection of all
> roads)   what function or series of functions will result in a list of
> locations where footways cross roads without any OSM connecting node?  (the
> equivalent of JOSM's "Crossing Ways" warning)

  The closest I could get to this was by splitting way
(planet_osm_lines) geometry into their segments. I was creating a new
table say „segments“ with identical attributes as planet_osm_lines in
which the same osm_id would be repeated as many times as many segments
that way has. (You could also do it without actually creating a new
table and letting postgresql process everything on the fly).

  If you have a way with three nodes, you would get two new lines (two
line geometries, two records in the new table).

  Then you can use PostGIS functions to find intersecting ways. But
you will not find intersection problems where two ways cross each
other on the same x/y, but they have two different points in OSM (two
different points with the same position one for way1, another for
way2).

-- 
Tomas

___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev