Gamestudio Links
Zorro Links
Newest Posts
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
LPDIRECT3DCUBETEXTUR
E9

by Ayumi. 04/12/24 11:00
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 04/11/24 14:56
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Quad, AndrewAMD), 410 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
11honza11, ccorrea, sakolin, rajesh7827, juergen_wue
19045 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Finding parcels in a road network #430877
10/04/13 09:23
10/04/13 09:23
Joined: Mar 2006
Posts: 1,993
Karlsruhe
PadMalcom Offline OP
Serious User
PadMalcom  Offline OP
Serious User

Joined: Mar 2006
Posts: 1,993
Karlsruhe
Hi, does anybody have an idea how I can determine the areas between the strees (marked red in the image)?

What I have is the intersection coordinates of the streets and access to the road models and their vertices.

What I want is a polygon that contains the shape of each area in between the streets.



Any help or idea is highly appreciated!

Re: Finding parcels in a road network [Re: PadMalcom] #430885
10/04/13 11:38
10/04/13 11:38
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
you could use a flood fill method if you can create from your road data an array or a bitmap with a proper resolution (road width or half of road width).


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Finding parcels in a road network [Re: PadMalcom] #430887
10/04/13 11:45
10/04/13 11:45
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 900
Lgh
@PadMalcom, I don't know what you exactly meant, but maybe region, like region_create is your choice.


Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: Finding parcels in a road network [Re: rojart] #431199
10/11/13 08:26
10/11/13 08:26
Joined: Mar 2006
Posts: 1,993
Karlsruhe
PadMalcom Offline OP
Serious User
PadMalcom  Offline OP
Serious User

Joined: Mar 2006
Posts: 1,993
Karlsruhe
@Sivan: Thanks for the hint. What I'll try to do is to trace from every vertec to another to create regions.

@rojart: The challenge for me is to determine the edges of the regions not a technical way to define them. But thanks anyway! laugh

Re: Finding parcels in a road network [Re: PadMalcom] #431330
10/14/13 08:57
10/14/13 08:57
Joined: Jan 2004
Posts: 3,023
The Netherlands
Helghast Offline
Expert
Helghast  Offline
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
This might be helpful, shows a flood fill way of doing it;
http://ima.udg.es/~sellares/ComGeo/Vor2D_1.ppt (Powerpoint presentation)


Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/
Re: Finding parcels in a road network [Re: Helghast] #431337
10/14/13 11:34
10/14/13 11:34
Joined: Mar 2006
Posts: 1,993
Karlsruhe
PadMalcom Offline OP
Serious User
PadMalcom  Offline OP
Serious User

Joined: Mar 2006
Posts: 1,993
Karlsruhe
Thanks helghast, infact I use Voronoi diagrams as an option to draw my road network. Unfortunately, I want tpe parcels to stick exactly to the polygons that define the borders of the roads and intersections.

Re: Finding parcels in a road network [Re: PadMalcom] #431340
10/14/13 13:22
10/14/13 13:22
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
In the case you have the links of each vertex sorted clockwise or inverse, you can take a vertex, go to its neighbor and go to the next vertex by the next link until you reach the first vertex, closing the shape.



If you create each link as a couple of links, one per direction starting from each vertex involved in the link, you can disable the links involved on the shape creation until you have no linked vertexes at all.



It will definetively create a shape per zone, but it is a bit complicated...

Hope it helps

Re: Finding parcels in a road network [Re: txesmi] #431363
10/15/13 09:14
10/15/13 09:14
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
I see this solution did not convince you frown

Any question?

Re: Finding parcels in a road network [Re: txesmi] #431364
10/15/13 09:20
10/15/13 09:20
Joined: Mar 2006
Posts: 1,993
Karlsruhe
PadMalcom Offline OP
Serious User
PadMalcom  Offline OP
Serious User

Joined: Mar 2006
Posts: 1,993
Karlsruhe
Hey txesmi, thanks for your answer but there are several problems with your approach.

Quote:
go to its neighbor

How do I find the neighbour? My roads consist of ~100 vertices.

Quote:
closing the shape

What if a shape is not closed? If you watch a voronoi diagramm it has ends that don't form a polygon.

Furthermore, there can be more than 2 networks that are not connected. Again a special case that is not covered by your idea.

But thanks anyway! I'm very glad you are thinking with me!

Re: Finding parcels in a road network [Re: PadMalcom] #431368
10/15/13 09:40
10/15/13 09:40
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest


Free world editor for 3D Gamestudio: MapBuilder Editor
Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1