|
POST
|
Hi Abhishek, Can you tell us your CE Version? Are you included all expected parameters?
... View more
05-23-2017
03:41 PM
|
0
|
1
|
3232
|
|
POST
|
Hi Mansi, Can you share any details about the issues are you facing? Is there a specific element we can help with?
... View more
05-23-2017
02:43 PM
|
0
|
4
|
4136
|
|
POST
|
Hi Nikos, From a GIS perspective, the short answer is CE preserves these attributes but does not intrinsically know what to do with them. You can make or modify a rule to visualize street based on your research categories (as Cheryl suggested), but you can also select those streets that match a specific category and color code them/change them per that category. I usually do this when making batch edits based on functional classification (similar to what you are doing now). For example, if you have a bunch of streets in a "traffic calming" category as your streets get closer to a school, then maybe you select every street in that category and add high visibility crosswalks and narrow the lane widths. Or you just set their color to something unique for visualization purposes. How detailed do you want your streets to be? If you have street widths/lanes information it makes sense to provide that information in a form that matches the street object/rule attributes you are using. This makes them automatically map to the rule of interest on import. # --------------------------------
# Name: CESelectLayerByAttribute.py
# Purpose: Select an object by an attribute in CityEngine.
# Current Owner: David Wasserman
# Last Modified: 12/22/2015
# Copyright: (c) Co-Adaptive
# CityEngine Vs: 2015.2
# Python Version: 2.7
# License
# Copyright 2016 David J. Wasserman
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# --------------------------------
# Import Modules
from scripting import *
# get a CityEngine instance
ce = CE()
# Declare variables
fieldName = "Crosswalk_End"
fieldValue = "ladder"
# Main Function
def selectObjByAttribute(attr, value):
layers = ce.getObjectsFrom(ce.scene, ce.isLayer)
print(
"There are " + str(len(layers) - 2) + " layers in the current scene.") # -2 To remove Panorama and Scene Light
counter = 0
print("Iterating through all layers")
print("Collecting objects from scene.")
selectedLayers = [] # Selection is an empty list to hold all our slection
for layer in layers: # for loop iterates through all objects in scene
print("Checking objects in layer ", layer)
objectList = ce.getObjectsFrom(layer)
for object in objectList:
attrvalue = ce.getAttribute(object, attr) # attrvalue gets assigned to it a retrieved attribute
print("The current layer is:", layer)
if attrvalue == value: # if the attribute equals our value
selectedLayers.append(layer) # append the attribute value pair to the list selection
print("Matched Attribute at value", value, " layer Added to selection.")
break
ce.setSelection(selectedLayers) # set the selection equal to the list we just made
ce.waitForUIIdle()
if __name__ == '__main__':
selectObjByAttribute(fieldName, fieldValue)
pass
... View more
05-11-2017
07:53 AM
|
0
|
0
|
2324
|
|
POST
|
This is a very useful tool for working with OSM data, and it also have some decent handling of some of the odd network classifications you are seeing now in your network. I would give this a try, but keep in mind you still might have to do some QAQC still if the underlying data and its functional classifications are a concern.
... View more
05-05-2017
03:05 PM
|
0
|
0
|
1472
|
|
POST
|
Hi Salman, I have found OSM to be the best available free dataset for pedestrian network analysis, but it does require cleaning first. Generally an OSM network requires at the very least planarized lines where there is not a "tunnel" or "bridge" tag (it does not go over or underground- you don't want your trail under a highway to have connectivity to an interchange!). It also usually requires speeds to be imputed off functional class. If your functional class field from OSM is not very dependable, I would suggest not using it. However, if OSM is the best available, maybe try to compare it to another series of datasets? If you can't find a good dataset to compare against in centerline form, you might be able to use more aggregate geometries to prioritize which parts of the network you QAQC. This could be demographic data sets, or potentially amenity datasets from OSM so that you can prioritize connections around restaurants and other likely destinations that people might want to walk to. Others might have better advice. David
... View more
05-04-2017
01:38 PM
|
0
|
0
|
1472
|
|
POST
|
The Complete Street Rule can be found here for reference:Complete Street Rule Update Let me know if you have any questions. As a side note relating to using an imported street network, make sure that your network has a clean and simplified topology as much as possible (just to reduce the work you might need to do in CityEngine). You will likely need to clean up the network in CityEngine after import, and the documentation provides some details on this process as well. Cleanup Graph Networks
... View more
05-04-2017
09:55 AM
|
3
|
3
|
2324
|
|
POST
|
Hi Curtis, I will check on this back at work, but I am not sure that explains my error. This does help though, it gives me something to check. I went though pains to make sure everything was state plane, but I could have missed something.
... View more
04-24-2017
09:41 PM
|
0
|
0
|
3723
|
|
POST
|
I actually ran into this issue recently. Any news on it? I eventually just sampled the raster to vector and did a calculate field in python to do the weighted sum... Anyone else?
... View more
04-24-2017
05:41 PM
|
0
|
5
|
3723
|
|
DOC
|
Wow, that is a massive right of way. What is the total width on that super arterial? The modification you request is a parameter addition that requires deeper changes, but not terribly difficult. The steps for this are as follows generally for modifications like this: 1. Identify the attribute that controls the sidewalk texture. In this case: attr Sidewalk_Texture = Default_Pavement. 2. Find all references to this attribute in the rule. Determine where it is relevant. Check its relationship to the rule actually generating geometry where you care about. In this case, you just modified this section, and noticed this rule: Sidewalk_Pavement ("Through Zone") 3. Follow that rule. It should lead you to: Sidewalk_Pavement (Location). 4. From here you have several options- separate the "Through Zone" location string from the rest of the flow of the rule (remove corners or give it a separate if statement. From here you can make a new attribute called attr Sidewalk_Through_Texture= Default_Pavement. Place it somewhere appropriate in the rule if you want to use the rule again. You now can just replace that new texture attribute so that the altered Sidewalk_Pavement rule references that texture attribute. Copy the relevant description/range @annotations in the sidewalk_texture attribute. Another option is to modify the string so it sans "New Through Zone" and alter the "else" portion of the rule. Not sure all the consequences of the last one. David
... View more
04-22-2017
11:47 AM
|
0
|
0
|
42907
|
|
DOC
|
I will take a look. I kept the sidewalk rule pretty simple. You could alter the sidewalk rules so that it inserts two planting areas. That would just be copy pasting the rule from planting twice, but parameterizing it would require deeper modifications.
... View more
04-20-2017
01:42 PM
|
0
|
0
|
42907
|
|
DOC
|
Hi Wendell, That is what I was imagining. You need to alter the rule as per my previous comment I think. Do you think this is a common need Wendell? I don't do many sidewalk side paths with CE, so I don't know if I should add it as an option. David
... View more
04-20-2017
10:41 AM
|
0
|
0
|
42906
|
|
DOC
|
Hi Wendell, To clarify, you want the sidewalk side bike lanes to be between the trees and the angled parking correct? So the sidewalk highlighted would be "Walkway:Trees:Bike Lanes"? If yes, you need to alter the splits in the sidewalk rule rather than change attributes. Relevant rule below: you would change the location of the bolded split to be in some other location relative to _Side_Sidewalk_Planting_Width (above it? have not tested). Save a separate version of the rule before testing. SidewalkTop(side)--> case valency>1: Sidewalk_Pavement ("Corners") case Sidewalk_Ground_Cover =="None": split(v,unitSpace,0) {CurbtoPlantingGap:Sign_Loader(side) |_Side_Sidewalk_Planting_Width(side):Sidewalk_WOPlant_Loading_Section (case side=="Right":0 else:2)# Uses a different loading section rule |_Sidewalk_BikeLane_Width(case side=="Right":0 else: 2) :Sidewalk_Bike_Lane_Loader(case side=="Right":0 else: 2) |~1: Sidewalk_Pavement ("Through Zone") People} else: split(v,unitSpace,0){CurbtoPlantingGap:Sign_Loader(side) |_Side_Sidewalk_Planting_Width(side): Sidewalk_WPlant_Loading_Section (case side=="Right":0 else:2) |_Sidewalk_BikeLane_Width(case side=="Right":0 else: 2) :Sidewalk_Bike_Lane_Loader(case side=="Right":0 else: 2) |~1: Sidewalk_Pavement ("Through Zone") People}
... View more
04-20-2017
08:32 AM
|
0
|
0
|
42906
|
|
DOC
|
Hi Dan, Yeah I think I will try to do it for more tools now. This makes it really easy to maintain. David
... View more
04-19-2017
11:18 AM
|
0
|
0
|
2097
|
|
DOC
|
Hi Dan, I recently found you can put Github links in ArcGIS Code Sharing. Here is the URL: https://www.arcgis.com/home/item.html?id=286cfeecb93d4a4e9b4cff9c7460bebc Should I put more information? I have not used it much.
... View more
04-19-2017
10:24 AM
|
0
|
0
|
2097
|
|
DOC
|
Hi Geonet! I have not gotten to share much of the rules I have developed at my current job, but I do have something I have been playing with that I have found useful. I made a series of toy statistical functions I thought I would share. I am still working on them a little bit (I might try overloading them to simplify them). They use string lists to compute statistics which is clearly not ideal, but it does have its uses (largely using string lists to potentially control shapes, adjust splits, etc). They are not perfect or optimized, but they work. Let me know if some other statistic might be helpful for your work. Download Link Github repo: GitHub - d-wasserman/cga-stats: This is a simple set of functions to calculate standard statistics within CityEngine's C… Devin Lavigne Eric Wittner Chris Wilkins
... View more
04-07-2017
05:36 PM
|
0
|
2
|
3366
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-07-2024 02:16 PM | |
| 1 | 05-15-2022 12:21 PM | |
| 1 | 08-27-2016 11:03 AM | |
| 1 | 12-19-2021 01:10 PM | |
| 1 | 06-12-2020 03:29 PM |