Loading

GEO.GML

geo
Configuration parameters

The GEO.GML function creates a WarpScript object (GEOSHAPE) representing a geographical area. The description of the geographical area uses the GML format.

The coordinates are assumed to be in WGS 84.

A GEOSHAPE is a set of cells at various resolutions which cover (or are contained within) the specified area. The resolutions of the cells are even numbers from 2 (coarsest) to 30 (finest) with the following associated precisions at the equator:

ResolutionPrecision
210,000 km
42,500 km
6625 km
8156 km
1039 km
1210 km
142.5 km
16600 m
18150 m
2040 m
2210 m
242.5 m
2660 cm
2815 cm
304 cm

The exact precision is 40,000 km divided by 2**resolution.

The number of cells that a GEOSHAPE may contain is limited by the platform configuration, this limit can be modified up to the hard limit using MAXGEOCELLS.

Since 2.4.0, you can easily visualize geoshapes in WarpScript editors. See example.

GEO.GML is available since version 2.9.0.

See also

Signatures

Examples

// Area in GML <' <gml:Polygon> <gml:outerBoundaryIs> <gml:LinearRing> <gml:coordinates>-0.318987,47.003018 -0.768746,47.358268 -0.574463,47.684285 -0.347374,47.854602 -0.006740,47.925567 0.135191,47.726864 0.149384,47.599127 0.419052,47.670092 0.532597,47.428810 0.305508,47.443003 0.475824,47.144948 0.064225,47.201721 -0.318987,47.003018 </gml:coordinates> </gml:LinearRing> </gml:outerBoundaryIs> <gml:innerBoundaryIs> <gml:LinearRing> <gml:coordinates>-0.035126,47.485582 -0.035126,47.485582 -0.049319,47.641706 -0.233829,47.655899 -0.375760,47.457196 -0.276408,47.286879 -0.035126,47.485582 </gml:coordinates> </gml:LinearRing> </gml:innerBoundaryIs> </gml:Polygon> '> // Precision (10% of the bounding box diagonal) 0.1 // Consider all cells covering the area false GEO.GML // Since 2.4.0, you can easily view GeoShapes on the map, in both vscode and Warp Studio editors. true ->GEOJSON JSON-> 'geojson' STORE // the map web component in vscode or warp studio will parse // this special object and draw the geoshapes { 'data' [ $geojson ] }