Tutorial: Import SHP Files into Altizure Planets

Now Altizure Planets can support importing shapefile and plotting geometric annotations in batches. Entry into the Planets creation interface, click the Import Data icon from Toolbar, select SHP button to import the shp file into the Planets and present it as a 3D solid.
Currently 4 types of brush geometries can be supported importing.

  • Annotation
  • Light Beam
  • Polyline
  • Polytube
  • Polygon

The feature file for corresponding point, line and polygon in shp is as below

File Type Correspondence

Planet Geometry Type SHP Feature Category
Annotation Point
Lightbeam Point
Polyline Polyline
Polygon Polygon
Polytube Polyline

Notes to file import:

  • Please compress all the shp file groups into the zip file before uploading;
  • The same shp group in the compressed file should contain at least .shp, .shx, .dbf;
  • A compression package can contain multiple shp file groups;
  • The imported shp should be opened normally in qgis or arcmap;
  • A clear coordinate system needs to be set before shp is imported;
  • To avoid garbled Chinese characters, it is recommended to edit the generated UTF-8 encoded shp file by QGIS or ArcGIS Desktop 10.2.1 or above. Details refer to How To: Read and write shapefile and dBASE files encoded in various code pages
  • If you encounter garbled problems, you can refer to the following Q & A Question 1: How to solve garbled problems;
  • If the Planets has any coordinate system set, you need to define the coordinate system of the shp file as Web Mercator (EPSG: 3857) for proper import.
  • The shp field name has a mapping relationship with the Planets attribute. Please refer to the corresponding relationship table below.

Demonstration Case

Now we have the map of administrative divisions in Guangzhou, which is opened in QGIS as below. We want to import it into the planets in the form of polygon.

行政区划图.png

Right-click on the layer and choose Open Attribute Table. You can find that there is already some data in each division.

打开属性表.png

Available Data:

现有的数据.png
As show, there is already a "name" field in the existing data, which is exactly what we want to mark on the area, so there is no need to change it.
Now we want to use the colors we set for each administrative division. Referring to the "polyhedron" table in the attribute correspondence table above, it is known that the color field should be added to assign colors.

新增字段.png

The attribute value of the color field needs to be a color string that can be recognized by JavaScript. E.g. red, #ff0000, rgb(255,0,0)

color字段设置.png

Create a compression package of the edited file group.

创建压缩包.png

Upload the compression package to Planets.

1572507666(1).png

When the upload is complete, you can configure the correspondence between shp data and the planet style properties.
This is the key step. Through field matching, you can set the style of the planet entity in batches by the original shp attribute, such as: color, transparency, label height, polyhedral height etc. (Details as per "Attribute Correspondence Table" below)
The fields with the same or similar names will be pre-assigned.
星球样式与shp属性表中字段做匹配.png

The imported SHP data is syncing with the planet background:
导入的shp数据正在和星球后台同步.png

Import Outcome:
导入效果.png

Sample Data

Sample data access link: https://pan.baidu.com/s/1qOLXI-VAai5D_PtyDK7Mdg
Password:yasp

Q&A

Q1:

  • The Chinese information I imported is garbled. How to solve it?
  • The previous versions of ArcGIS Desktop 10.2.1 uses GBK encoding for the Chinese string, and the data needed to be converted into UTF8 encoding by QGIS before properly importing into the planet. Detailed steps are as follows:
    When open a sample plot data in QGIS, we can find garbled characters in the property sheet.
    table乱码.png
    Right click on the layer to view the properties.
    打开图层属性.png
    In the attribute source tab, set the Data source encoding to GBK.
    设置源数据编码为gbk.png
    Then close the properties dialog and right click to export the layer.
    导出图层.png
    In the export layer dialog box, set the Encoding to UTF-8 to complete the conversion of shp character encoding .
    导出utf8.png

Attribute Correspondence Table

The type, height, style, and other information of geometric annotations on the planet can be controlled by setting and editing the corresponding field values in the shp file property sheet. If the fields are not defined, the Planet draws the annotation in the default style.

Annotations

Annotation corresponds to the point feature in shp file.

Field Name Data Format Corresponding Planet Label Attributes Required Remark
type Text(string) Type Yes marked as annotation
name Text(string) Name No e.g. new annotation
visible Integer Overall Visibility No 1 = Visible,0 = Hidden
icon Text(string) Label Icon No The English name of the icon - you can switch to the English version of the planet to see the corresponding English name of each icon.
textColor Text(string) Text Color No Text Color, e.g. #FFFFFF
pinLength Decimal number (real) Annotation Height No e.g. 23.60
textAlign Text(string) Text Position No center, left, right
descriptio Text(string) Introduction No

Lightbeam

Lightbeam corresponds to the point feature in shp file.

shp Field Name Data Format Corresponding Planet Label Attributes Required Remark
type Text(string) Type Yes marked as lightbeam
name Text(string) Name No e.g. new lightbeam
visible integer Overall Visibility No 1 = Visible,0 = Hidden
labelsVisi integer Label Visibility No 1 = Visible,0 = Hidden
textColor Text(string) Text Color No Text Color, e.g. #FFFFFF
color Text(string) Shape Color No Overall shape color,e.g.#FFFFFF
radius Decimal number (real) Radius No e.g. 5
height Decimal number (real) Height No 如 40
pinLength Decimal number (real) Ligtbeam Height No e.g. 23.60
opacity Decimal number (real) Transparency No 0~1 Floating Point
textAlign Text(string) Text Position No center, left, right
descriptio Text(string) Introduction No

Polyline

Polyline corresponds to the polyline feature in shp file.

shp Field Name Data Format Corresponding Planet Label Attributes Required Remark
type Text(string) Type Yes marked as polyline
name Text(string) Name No e.g. new polyline
visible integer Overall Visibility No 1 = Visible,0 = Hidden
labelsVisi integer Label Visibility No 1 = Visible,0 = Hidden
texture Text(string) Texture No e.g.fence, arrow
animation Text(string) Animation No Horizontal Flow:horizontal,Vertical Flow:vertical,None:none
icon Text(string) Label Icon No The English name of the icon - you can switch to the English version of the planet to see the corresponding English name of each icon.
textColor Text(string) Text Color No Text Color, e.g. #FFFFFF
color Text(string) Shape Color No Overall shape color,e.g.#FFFFFF
pinLength Decimal number (real) Polyline Height No e.g. 23.60
lineWidth Decimal number (real) Line Width No e.g. 0.60
fenceHeigh Decimal number (real) Fence Height No e.g. 7.60
opacity Decimal number (real) Transparency No 0~1 Floating Point
textAlign Text(string) Text Position No center, left, right
descriptio Text(string) Introduction No

Polygon

Polygon corresponds to the polygon feature in shp file.

shp Field Name Data Format Corresponding Planet Label Attributes Required Remark
type Text(string) Type Yes marked as polygon
name Text(string) Name No e.g. new volume
visible integer Overall Visibility No 1 = Visible,0 = Hidden
labelsVisi integer Label Visibility No 1 = Visible,0 = Hidden
textColor Text(string) Text Color No Text Color, e.g. #FFFFFF
color Text(string) Shape Color No Overall shape color,e.g.#FFFFFF
hasTopCove integer Top Visibility No 1 = Visible,0 = Hidden
hasBottomC integer Bottom Visibility No 1 = Visible,0 = Hidden
top Decimal number (real) Top Height No e.g. 40
bottom Decimal number (real) Bottom Height No e.g. 5
pinLength Decimal number (real) Polygon Height No e.g. 23.60
opacity Decimal number (real) Transparency No 0~1 Floating Point
descriptio Text(string) Introduction No

Polytube

Polytube corresponds to the polyline feature in shp file.

shp Field Name Data Format Corresponding Planet Label Attributes Required Remark
type Text(string) type Yes marked as polytube
name Text(string) Name No e.g. new tube
lineWidth Decimal number (real) Line Width No Set the pipe width in meters
texture Text(string) Texture No e.g.fence, arrow
animation Text(string) Animation No Horizontal Flow:horizontal,Vertical Flow:vertical,None:none
color Text(string) Shape Color No Overall shape color,e.g.#FFFFFF
visible integer Overall Visibility No 1 = Visible,0 = Hidden
labelsVisi integer Label Visibility No 1 = Visible,0 = Hidden
opacity Decimal number (real) Transparency No 0~1 Floating Point
icon Text(string) Label Icon No The English name of the icon - you can switch to the English version of the planet to see the corresponding English name of each icon.
textColor Text(string) Text Color No Text Color, e.g. #FFFFFF
pinLength Decimal number (real) Polytube Height No e.g. 23.60
textAlign Text(string) Text Position No center, left, right
descriptio Text(string) Introduction No