기하 구조자
Contents
[
Hide
]
Point Geometry
Point 생성
API를 사용하여 지리 공간 점을 만드는 것은 다음과 같은 코드 샘플에서 볼 수 있듯이 간단하고 쉽습니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-gis/Aspose.GIS-for-.NET | |
Point point = new Point(40.7128, -74.006); |
MultiPoint 생성
Aspose.GIS for .NET은 점 컬렉션을 단일 MultiPoint 클래스로 표현할 수 있는 기능을 제공합니다. 각 Point의 위도-경도 정보로 정의된 하나 이상의 Point를 포함할 수 있습니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-gis/Aspose.GIS-for-.NET | |
MultiPoint multipoint = new MultiPoint(); | |
multipoint.Add(new Point(1, 2)); | |
multipoint.Add(new Point(3, 4)); |
Line String Geometry
Point Geometries을 지정하여 Line String을 만들 수 있습니다.
Line String 생성
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-gis/Aspose.GIS-for-.NET | |
LineString line = new LineString(); | |
line.AddPoint(78.65, -32.65); | |
line.AddPoint(-98.65, 12.65); |
MultiLine String 생성
MultiLine string은 Point geometries로 구성된 Line Strings의 컬렉션입니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-gis/Aspose.GIS-for-.NET | |
LineString firstLine = new LineString(); | |
firstLine.AddPoint(7.5, -3.5); | |
firstLine.AddPoint(-9.6, 12.6); | |
LineString secondLine = new LineString(); | |
secondLine.AddPoint(8.5, -2.6); | |
secondLine.AddPoint(-8.6, 1.5); | |
MultiLineString multiLineString = new MultiLineString(); | |
multiLineString.Add(firstLine); | |
multiLineString.Add(secondLine); |
Polygon Geometry
Polygon은 LinearRing 형식의 Point로 정의된 Point geometries 컬렉션입니다.
Polygon 생성
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-gis/Aspose.GIS-for-.NET | |
Polygon polygon = new Polygon(); | |
LinearRing ring = new LinearRing(); | |
ring.AddPoint(50.02, 36.22); | |
ring.AddPoint(49.99, 36.26); | |
ring.AddPoint(49.97, 36.23); | |
ring.AddPoint(49.98, 36.17); | |
ring.AddPoint(50.02, 36.22); | |
polygon.ExteriorRing = ring; |
MultiPolygon 생성
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-gis/Aspose.GIS-for-.NET | |
LinearRing firstRing = new LinearRing(); | |
firstRing.AddPoint(8.5, -2.5); | |
firstRing.AddPoint(-8.5, 2.5); | |
firstRing.AddPoint(8.5, -2.5); | |
Polygon firstPolygon = new Polygon(firstRing); | |
LinearRing secondRing = new LinearRing(); | |
secondRing.AddPoint(7.6, -3.6); | |
secondRing.AddPoint(-9.6, 1.5); | |
secondRing.AddPoint(7.6, -3.6); | |
Polygon secondPolygon = new Polygon(secondRing); | |
MultiPolygon multiPolygon = new MultiPolygon(); | |
multiPolygon.Add(firstPolygon); | |
multiPolygon.Add(secondPolygon); |
Hole이 있는 Polygon 생성
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-gis/Aspose.GIS-for-.NET | |
Polygon polygon = new Polygon(); | |
LinearRing ring = new LinearRing(); | |
ring.AddPoint(50.02, 36.22); | |
ring.AddPoint(49.99, 36.26); | |
ring.AddPoint(49.97, 36.23); | |
ring.AddPoint(49.98, 36.17); | |
ring.AddPoint(50.02, 36.22); | |
LinearRing hole = new LinearRing(); | |
hole.AddPoint(50.00, 36.22); | |
hole.AddPoint(49.99, 36.20); | |
hole.AddPoint(49.98, 36.23); | |
hole.AddPoint(50.00, 36.24); | |
hole.AddPoint(50.00, 36.22); | |
polygon.ExteriorRing = ring; | |
polygon.AddInteriorRing(hole); |
Geometry Collection 생성
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-gis/Aspose.GIS-for-.NET | |
Point point = new Point(40.7128, -74.006); | |
LineString line = new LineString(); | |
line.AddPoint(78.65, -32.65); | |
line.AddPoint(-98.65, 12.65); | |
GeometryCollection geometryCollection = new GeometryCollection(); | |
geometryCollection.Add(point); | |
geometryCollection.Add(line); |