Servicios web
Surface calculation API
documentation, available via HTTP-JSON/XML service.
URL base service:
- JSON: http://lb.cercalia.com/services/json?key=<API KEY*>
- XML: http://lb.cercalia.com/services/xmlgeo?key=<A KEYPI*>
* API KEY. Same KEY used in maps API js
HTTP requests in GET or POST
Response in JSON / XML format
Surface calculation from a vehicle GPS track
Calculate the area covered by a vehicle GPS track. Optionally, several polygons can be attached, so that the area covered over each of them is calculated. If polygons are not included, the service returns them calculated.
REQUEST:
Example (calculates the area of a track additionally using a polygon, with a 2.55 meters buffer):
&cmd=areatrack&srs=epsg:4326&buffer=50&track1=[2.809462369338251,41.95580597584394@0,45@@10],[2.8098092256656186,41.95597581805723@0,45@@10],[2.8098885243929765,41.9559493840349@0,45@@10],[2.810016100173981,41.95592779891741@0,45@@10],[2.810115304067983,41.9559237253621@0,45@@10],[2.8101944970925485,41.95592797148458@0,45@@10],[2.8102577757390623,41.955898459241155@0,45@@10],[2.8106174608768644,41.955664327755116@0,45@@10],[2.810639961685843,41.955646972867655@0,45@@10],[2.810686117995519,41.95561145437738@0,45@@10],[2.8107168352826593,41.955588204605995@0,45@@10],[2.810743223084221,41.95556823965039@0,45@@10],[2.810760534768161,41.95555514537633@0,45@@10],[2.811028723713235,41.955334236290554@0,45@@10],[2.810966668224175,41.955184105834775@0,45@@10],[2.810823920109881,41.954838741708144@0,45@@10],[2.810812304527589,41.95484141558212@0,45@@10],[2.8092156547559055,41.955209046656115@0,45@@10],[2.809462369338251,41.95580597584394@0,45@@10]&polygon1=MULTIPOLYGON (((2.809462369338251 41.95580597584394, 2.8098092256656186 41.95597581805723, 2.8098885243929765 41.9559493840349, 2.810016100173981 41.95592779891741, 2.810115304067983 41.9559237253621, 2.8101944970925485 41.95592797148458, 2.8102577757390623 41.955898459241155, 2.8106174608768644 41.955664327755116, 2.810639961685843 41.955646972867655, 2.810686117995519 41.95561145437738, 2.8107168352826593 41.955588204605995, 2.810743223084221 41.95556823965039, 2.810760534768161 41.95555514537633, 2.811028723713235 41.955334236290554, 2.810966668224175 41.955184105834775, 2.810823920109881 41.954838741708144, 2.810812304527589 41.95484141558212, 2.8092156547559055 41.955209046656115, 2.809462369338251 41.95580597584394)))&geometrysrs=epsg:4326
where:
track1, track2...= comma separated list of markers (coordinates). Maximum: 5000 markers. Each marker (coordinate) has the following format: [X1,Y2...]. Optionally, is it possible to include several lists of tracks: in this case, the API will return the calculation for all of them respect to each polygon included.
SRS= coordinate system used in &track=. Default: EPSG:4326
GEOMETRYSRS= coordinate system of the polygons returned. Default: same used in &SRS=
polygon1, polygon2...= polygons or multi-polygons, in WKT format. If polygons are not included, the service returns them calculated, using the GPS track and a &buffer=
buffer= distance in meters to use around the track
RESPONSE:
<cercalia cmd="areatrack" version="1">
<track>
<geometry area="1071.03" id="1">
<wkt>POLYGON ((2.8094624 41.955806, 2.8098093 41.9559759, 2.8098885 41.9559494, 2.8100161 41.9559278, ...))</wkt>
</geometry>
</track>
</cercalia>
The area is returned in square meters.