Dave,
Yes, I think you are correct. It does not sound like you are creating
the polygons from the street network.
-Steve
Van Bakergem, William wrote:
Stephen,
We may be talking apples and oranges. Our project treats each city
block as a separate object floating in a sea of public right of ways.
We generate the streets with a default width (18.3 meters) and then
revise for streets with other widths. The tool is designed for
historic districts of about 500 city blocks. So, we do not have any
topological issues with left/right. Everything is counterclockwise
beginning in the most south west corner. There are no branches, only
single isolated polygons. We always know what's inside and what
outside.
Streets are generated on the fly when we need them - just the space
between the blocks with sidewalk and curb typologies. Street
attributes are managed via a street segments table whose geometry is
the center line. Is really simple, but works for a virtual 3d model
generator.
All of this is managed in a spatial temporal manager that keeps track
of when objects appear and disappear in the urban landscape over the
200 year time interval.
A timeline slide bar in the Xj3D viewer allows the user to see
changes in real time. Think H.G. Wells Time Machine.
It's all open source.
Dave
-----Original Message----- From:
[email protected] on behalf of Stephen
Woodbridge Sent: Thu 4/23/2009 3:35 PM To: PostGIS Users Discussion
Subject: Re: [postgis-users] How to create block polygons from street
network?
Hi Dave,
I have a client that is interested in getting polygon blocks from a
road network. I'm not sure what for but it seemed like something that
should not be that hard to do given noded street data. I have used
pgRouting so I know I can build a good adjacency graph of the data.
The problem with an adjacency graph is that it does not tell you
which node is right/left most so you have to do some analysis of the
geometry unless there is some nifty graph analysis the finds all
polygons in a graph.
How does your tool work? Are you will to share it? I was thinking
that such tools might be a useful add-on to postgis.
-Steve
Van Bakergem, William wrote:
Stephan,
I have a tool for generating city blocks from street center lines.
1. Given centerlines, street widths and street names (from Google
Maps), calculate intersections, blocks and block sides; 2. All
geometries are inserted into PostGIS tables; 3. From these table I
can generate a virtual city based on building typologies and
development histories for any year over a 200 year time interval.
4. Display in Xj3d or Google Earth (COLLADA).
I would like to hear more about your project.
Dave van Bakergem
-----Original Message----- From:
[email protected] on behalf of Stephen
Woodbridge Sent: Thu 4/23/2009 2:29 PM To: PostGIS Users Discussion
Subject: [postgis-users] How to create block polygons from street
network?
Hi all,
Here is an interesting problem that I could use some suggestions
and/or sample code for. I have a street network where all the
street segments are noded at intersections. What I need to extract
is all the blocks in the coverage. A "block" is the smallest
polygon bounded by segments that does not have any segment crossing
it. It could have a cul-de-sac protruding into its interior as long
as it does not divide the polygon in two.
I could create a node adjacency list, but I'm not sure if that
helps me.
I'm thinking that each edge needs to be tagged with a right and
left polygon id, then you can create polygons by grouping on the
id.
while (current = get_edge_without_rl_pid) { if
current.right_side_edge has no pid { get new_pid as this_pid get
other edges from end find right most edge if edge has id then {
update all new_pid to id mark new_pid as unused this_pid = id }
else mark both edges as this_pid } if current.left_side_edge has no
pid { get new_pid as this_pid get other edges from end find left
most edge if edge has id then { update all new_pid to id mark
new_pid as unused this_pid = id } else mark both edges as this_pid
} }
Does this seem like it would work? Anyone interested in turning
this into plpgsql?
It might be better to recursively pick an edge and recursively walk
connected right most edges back onto itself marking the edges as
you go. At some point you may still have edges not included in any
of the above that can only be marked by walking the left most
edges.
Thoughts?
-Steve W _______________________________________________
postgis-users mailing list [email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users
------------------------------------------------------------------------
_______________________________________________ postgis-users
mailing list [email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________ postgis-users mailing
list [email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users
------------------------------------------------------------------------
_______________________________________________ postgis-users mailing
list [email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users