gma 2.0.3 (2023.11.12) change log

Install gma 2.0.3

pip install gma==2.0.3

New

?This version is the version with the largest feature update of gma 2, and is mainly focused on vector data processing.

?0.1 io.ReadVector: Directly open vector data as Layer to simplify the io.Open.GetLayer process. The new features of Layer are as follows:

Serial number Function Property Description Return value type
1 Layer1 + Layer2 Special methods such as Union Layer
2 Layer1 – Layer2 Special methods Such as Erase Layer
3 Layer1 & amp; Layer2 Special methods such as Intersection Layer
4 Layer1 Layer2 Special methods such as Update
5 list(Layer) Special method Generate Feature list list
6 len(Layer) Special method Count Feature quantity int
7 CalculateSummaryStatistics Method Summary statistical analysis DataFrame
8 Collect Method Group combination Layer
9 ConcaveHull Method Compute geometric concave hull td>

Layer
10 ConvexHull Method Compute geometric convex hull Layer
11 DelaunayTriangulation Method Delaunay Triangulation Layer
12 Distance Method Calculate distance DataFrame
13 Envelope Method Generate outer box Layer
14 Explode Method Split multi-part elements Layer
15 Extent Method Extent rectangle Layer
16 ExteriorRing Method Outer loop Layer
17 GenGrid Method Generate vector grid Layer
18 GeomSelfTest Method Geometry Detection DataFrame
19 Identity Method Identity Layer
20 Info Properties Layer Information DataFrame
21 Multi Method Generate multi-part features Layer
22 PointOnSurface Method Polygon inner center point Layer
23 Preview Method Preview vector on map PlotLayer
24 RemoveRepeatedPoints Method Remove duplicate points Layer
25 Single Method Simplify elements Layer
26 VerticesToPoints Method Vertex to point Layer
27 VoronojDiagram Method Tyson Polygon Layer

?0.2 io.ReadRaster: Open raster data directly into DataSet to simplify the io.Open.GetDataSet process. The new features of DataSet are as follows:

Serial number Function Property Description Return value type
1 Preview Method Preview DataSet on the map PlotDataSet

Repair

?1.Layer-Intersection|Union|SymDifference
Fix the problem of exceptions caused when calling continuously.

?2. Kernel crash
Fixed some issues that could easily cause Python kernel to crash.

Adjustment

?1. Vector data internal exchange format
Vector data memory (internal) exchange format changed from Memory to GPKG geodatabase format.

?2. Spyder variable browser
Add support for viewing Layer property sheets in the Spyder variable browser.

?2. Band number
The band numbers of raster data uniformly start from 1. Some zero-based functions have been adjusted.

Simple example

gma 2 and sample data download:
Link: https://pan.baidu.com/s/1v9flUXmsgYPZUbzR88SIOA?pwd=h9b8
Extraction code: h9b8

from gma import io
Layer = io.ReadVector("Luoyang.gpkg")

Preview data

Layer.Preview()

Buffer

BF = Layer.Buffer(0.05)
BF.Preview()

Element vertex to point

VPoints = Layer.VerticesToPoints()
VPoints.Preview()

Generate square grid

Grid = Layer.GenGrid(Size = 0.05)
Grid.Preview()

Simplify (here to avoid generating abnormal polygons) and generate Thiessen polygons

VD = Layer.Simplify(0.0001).VoronojDiagram()
VD.Preview()

Simplify (here to avoid generating abnormal polygons) and generate Delaunay triangulation

VD = Layer.Simplify(0.0001).DelaunayTriangulation()
VD.Preview()