Create new model using roads SHP file and define boundary (Mask the model)

1297
4
05-26-2017 06:40 AM
deleted-user-qCpyynw67wg8
New Contributor II

Hi

I have roads as a shp file, i'm trying to create lots between all the roads and mask the model within a boundary (maybe a polygon shp file?) so that no roads or lots (Blocks) go outside that boundary.

The way i've been doing this is by importing the SHP file and checking 'Create Block/Lot Shapes from Graph'

this will create lots in some of the areas, but not all, what i really want it for it to create lots between all of the roads within a boundary ie. maybe a square boundary in this case where there would be no lots or roads generated.

can anyone point me in the right direction please?

thanks

Neil

Tags (4)
0 Kudos
4 Replies
ThomasFuchs
Esri Regular Contributor

Thank you for the questions.

For SHP files no boundaries can be defined on import. This option is only available for FileGDBs:

Block/Lot Shapes can only be created within a loop in the graph network.

If there is an error in the graph network (marked red), it has to be resolved first, before a block is generated.
This task can be automated with the Cleanup Graph Networks tool.

deleted-user-qCpyynw67wg8
New Contributor II

Many thanks for this Thomas, will give it a go..

0 Kudos
deleted-user-qCpyynw67wg8
New Contributor II

many thanks for your help with this. 

I've had a go with this but cannot get it to do exactly what i'm after....  see below elaborated....

We draw our zoning areas in Autocad Map 3D, and can save out a shp file, either polygon or line ( I haven’t managed to suss out which is best) and we would like cityengine to grow streets inside these areas and populate the areas with relevant buildings.

The task…. 

- grow streets in each area (including a street around the shape boundary)

  streets should be grown in either residential (closer roads and smaller parcels) or commercial style (larger road grid and larger parcels) The shp file input has a field to define whether the area is for residential or commercial.

- generate buildings for each area (residential or commercial) based on the SHP file field.

 

I've looked through the tutorials and it explains a similar process using images however i need to use vector data and limit the roads to these areas...

do you have any ideas on how to take this forward? maybe some Python scripting required?

thanks

Neil

0 Kudos
CherylLau
Esri Regular Contributor

This is a difficult task in CityEngine.  However, you could try something like the following:

1)  Import the shape file to create a graph network where the roads create your residential or commercial blocks.

2)  Create another graph network(s) using Grow Streets in a separate layer, according to the style you want.

3)  For each block, copy the graph segments that have at least one node inside the block into the original layer.

4)  Do some graph cleanup (Graph -> Cleanup Graph) to merge the new segments with the original segments from the shape file.  Some experimentation with the settings will probably be needed.

This could probably be automated with Python.

You could also try to create your own graph growing algorithm and specify street vertices in Python using createGraphSegments() if you want something really custom.  Use getObjectsFrom() and to get the imported blocks and getVertices() to get their vertices and getAttribute() to get the object attribute that says whether the block is residential or commercial.

0 Kudos