Type Mapping

When creating some GeoScript objects (e.g. process.Process() and feature.Field() objects), it is necessary to provide type information for converting values between Java and JavaScript. The list below describes the mapping between JavaScript types and the corresponding Java types.

Type Mapping

String Identifier

JavaScript Type

Java Type

"Boolean"

Boolean

java.lang.Boolean

"String"

String

java.lang.String

"Number"

Number

java.lang.Double

"Double"

Number

java.lang.Double

"Integer"

Number

java.lang.Integer

"Short"

Number

java.lang.Short

"Float"

Number

java.langFloat

"Long"

Number

java.lang.Long

"BigDecimal"

Number

java.math.BigDecimal

"Date"

Date

java.sql.Date

"Geometry"

geom.Geometry()

com.vividsolutions.jts.geom.Geometry

"Point"

geom.Point()

com.vividsolutions.jts.geom.Point

"LineString"

geom.LineString()

com.vividsolutions.jts.geom.LineString

"Polygon"

geom.Polygon()

com.vividsolutions.jts.geom.Polygon

"MultiPoint"

geom.MultiPoint()

com.vividsolutions.jts.geom.MultiPoint

"MultiLineString"

geom.MultiLineString()

com.vividsolutions.jts.geom.MultiLineString

"MultiPolygon"

geom.MultiPolygon()

com.vividsolutions.jts.geom.MultiPolygon

"GeometryCollection"

geom.GeometryCollection()

com.vividsolutions.jts.geom.GeometryCollection

"Bounds"

geom.Bounds()

org.geotools.geometry.jts.ReferencedEnvelope

"FeatureCollection"

feature.FeatureCollection()

org.geotools.feature.FeatureCollection

"Filter"

filter.Filter()

org.opengis.filter.Filter

"Projection"

proj.Projection()

org.opengis.referencing.crs.CoordinateReferenceSystem

"Time"

Date

java.sql.Time

"Datetime"

Date

java.util.Date

"Timestamp"

Date

java.sql.Timestamp

"URI"

String

java.net.URI