<< Click to Display Table of Contents >>

SuperGIS Server JavaScript API

 

new sg.geometry.Geometry()

 

 

Description

建立一個Geometry 物件

 

Position

Geometry.js

 

 

Properties

 

Properties

Type

Description

extent

sg.geometry.Extent

幾何資料範圍

type

String

幾何資料的類型

 

 

Methods

 

Methods

Type

Description

fromWKT(wkt)

wkt:String

Returns:Object

將Well Know Text字串轉成Geometry

Name

Type

Description

wkt

String

WKT字串

Return :

Type

Description

Object

Name

Type

Description

Geometry

sg.geometry.Geomtry

幾何物件

type

String

幾何資料的類型

toWkt(geom)

geom:sg.geometry.Geomtry

Returns:String

將Geometry字串轉成Well Know Text

將Well Know Text字串轉成Geometry

Name

Type

Description

Geometry

sg.geometry.Geomtry

幾何物件

Returns:

Type

Description

String

wkt字串

getExtent()

Returns:

sg.geometry.Extent

取得幾何資料範圍

Returns:

Type

Description

sg.geometry.EXtent

幾何範圍

 

 

Example

 

 

<script type="text/javascript" src="scripts/Geometry.js"></script>

 

var wkt ="POINT (1461784 5416536)";

var geo = new sg.geometry.Geometry.fromWKT(wkt);

var geometry = geo.geometry;

 

 


©2015 Supergeo Technologies Inc.