kikita & Maps

GIS,spatial and artificial intellegence learning and share

在论坛上看到一篇很好的讲述如题主题的文章,很有价值,可以为CityEngine选择合适的栅格数据或者纹理,提供一些帮助,原文如下:


textures / raster files : concepts in CityEngine / ArcGIS

Hi,

Quite a few new customers and people evaluating CityEngine who are working in the field of GIS ask about how CityEngine handles ‘raster files’ or ‘basemaps’ and what the best practices are concerning file resolutions.

Since CityEngine works ( from a technology-POV ) very similar as many other pure 3d applications (CityEngine is a 3d Modelling Application), I wanted to point out a few differences between CityEngine and ArcGIS :

ArcGIS-users call bitmap files ‘raster files’ due to their grid-based nature. People usually working with 3d applications call them ‘textures’. It’s the same thing.

ArcGIS has technologies embedded which ‘dynamically’ load only the part of a dataset which is currently visible on screen. Thus, with this technology HUGE raster datasets (> 1GB) can easily be displayed.
CityEngine does NOT have such a streaming service, thus raster files / textures should be prepared with some basic knowledge how they shall be used in a CityEngine project.

Important things to know :

1] Arc GIS’ basemaps can not directly be loaded in CityEngine as a layer. The user must export the specific ‘area of interest’ (extent) as a texture to be used within CityEngine.
2] To be able to work with textures, all the textures must reside within the opened project, usually in the ‘assets’ folder general textures, respectively the ‘maps’ folder for map-/basemap - textures (or a subdirectory).
3] CityEngine is a 3d application which uses a technology called ‘OpenGL’ to display the 3d models (and the scene). Displaying 3d graphics this way uses the computer’s graphics card . For this, all textures are fully loaded in thatgraphics card’s memory. [Please note that the computer has ‘main memory’, which is usually called RAM. A graphics card has it’s own RAM, often called ‘Video RAM’. ]
4] Since the amount of memory on graphics cards is usually quite small (~ 256 MegaBytes - 1.5 GigaBytes), one can imagine that the resources should be handled carefully !
5] Please note that when importing raster files from ArcGIS (e.g. GeoTIF), the file’s projection MUST MATCH the CityEngine scene’s Scene Coordinate System. CityEngine can not (yet) reproject raster files when importing into the scene (as opposed to Shapes and Graph Segments !).

Read more »

在过去的版本,例如 9.31,10.0 我们在安装目录中可以找到存放系统 prj 的地址,例如 C:\Program Files (x86)\ArcGIS\Desktop10.0\Coordinate Systems\Projected Coordinate Systems。但是10.0之后,我们发现,这个文件夹消失了,那要得到其中的Prj文件怎么做呢?

现在的 Coordinate Systems 文件变成的虚拟的结构,prj 文件都存储在 projection engine library (pe.dll)。从安装包中去掉了4000+的 prj 文件,会提升安装的性能。

如果是自定义的 prj 文件, 可以将文件复制到 ArcMap Favorites 文件夹。 如果需要得到 prj 文件,可以将其添加到收藏,或者另存为副本。

收藏夹的位置:

Win7 :c:\Users\[login]\[Roaming | Local | etc]\AppData\ESRI\Desktop10.1\ArcMap\Coordinate Systems

WinXP: C:\Documents and Settings\[login]\Application Data\ESRI\Desktop10.1\ArcMap\Coordinate Systems

文件夹中支持子文件夹进行分类。

很多用户会关心FileGDB的参数,扒出来方便参考:

File geodatabase size and name limits are as follows:

  • File geodatabase size: No limit

  • Table or feature class size: 1 TB (default), 4 GB or 256 TB with keyword

  • Number of feature classes and tables: 2,147,483,647

  • Number of fields in a feature class or table: 65,534

  • Number of rows in a feature class or table: 2,147,483,647

  • Geodatabase name length: Number of characters the operating system allows in a folder name

  • Feature class or table name length: 160 characters

  • Field name length: 64 characters

  • Text field width: 2,147,483,647

链接:
http://resources.arcgis.com/en/help/main/10.1/index.html#//018s00000002000000

使用CGA代码将对象(路灯、树木等)放置到路边。这里用到的主要方法就是Split 函数去做分割。

思路是,现将shape按照较短的轴向进行最初的分割剥离,得到路的两边sidewalk,然后将这些分割出来的形状进行再次分割,也就是沿着长的轴的方向分割成多个重复的小的形状,最后,用实际的模型(如路灯或树等)替换这些小块。


下面是示例代码,参考下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Sidewalk -->  
SidewalkGeometry.
SidewalkObjects # 复制shape!

# 思路:沿着道路的方向纵向切割道路,得到两边的人行道。
# 在剩下的shape“dot”中,插入树木、路灯等静态模型对象。

attr placementWidth = 0.05

attr streetDist = 0.2
attr objectDist = 5

attr objectSize = 0.1
attr objectHeigt = 2

SidewalkObjects -->
# 沿道路纵向分割两边的人行道。
split(v,unitSpace,0) { streetDist : NIL | placementWidth : PlacementStrip | ~1 : NIL }


PlacementStrip -->
# 沿着人行道分割横向切割,切成小段。
split(u,unitSpace,0) {objectDist: NIL | placementWidth : PlacementPoint }*

PlacementPoint -->
alignScopeToGeometry(yUp, 0) # align the shape to the current point shape, thus the street direction!
# r(0,90,0) # 旋转90度,视情况使用,例如路灯模型。
s(objectSize*2, objectHeigt, objectSize)
i("builtin:cube")
center(xz)

效果示例:

CityEngine软件的自带帮助中有大量的信息可供查找学习,但是自带的 Help Content,正常是在启动CE后,再去打开才可以,这与 eclips 的帮助是一个道理。

有时仅仅为了看看帮助,而启动着庞大的CE,有点喧宾夺主喽。在老王的帮助指导下,找到了单独运行CE帮助的方法,磨刀不误砍柴工~ 在这里总结下。


一、设置系统环境变量

  1. 在“系统变量“”中,设置3项属性,JAVA_HOME, PATH, CLASSPATH (大小写无所谓)), 若已存在则编辑,不存在则新建;

  • JAVA_HOME:例如:**C:\Program Files\Esri\CityEngine**(CE的安装目录即可,下面有 bin 和 jre 文件夹)
  • PATH:**%JAVA_HOME%/bin;%JAVA_HOME%/jre/bin**
  • CLASSPATH: **.;%JAVA_HOME%/lib/dt.jar;%JAVA_HOME%/lib/tools.jar**(要加.表示当前路径)

PS:%JAVA_HOME% 就是引用前面指定的 JAVA_HOME

关于配置环境变量的详情,可参阅:http://blog.csdn.net/huanghm88/article/details/3965218

2.键入命令 java,出现画面,说明环境变量配置成功;

Read more »
0%