Zone visit analysis documentation, avaliable via
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
Zone visit analysis
Calculate in what percentage (%) a vehicle has visited all the planned streets and squares, using raster analysis technology.
The analysis uses the routes of the vehicles (GPS traces), and the geometries (lines and polygons) of the streets and squares through which the vehicle should pass. The objective of this analysis is to detect if the vehicle has visited those areas, regardless of the route order.
Use a HTTP POST request. Call parameters:
Coverage analysis request
API KEY. Same KEY used in maps API js
XML document, with this format: cercaliaCoverage.xsd
XML document format:
The <trips> tag contains a list of geometries in WKT format (LINESTRING or MULTILINESTRING type), corresponding to the GPS track of the vehicle. These geometries will be painted with the thickness indicated in the width attribute.
The <zones> tag contains the list of streets and areas to analyze if the vehicle has visited. Each zone is identified with an ID and a list of geometries, these can be MULTILINESTRING, LINESTRING, POLYGON and MULTIPOLYGON types.
Each pixel in the image represents 1 square meter and images larger than 10,000 x 10,000 pixels cannot be generated. Therefore, it must be ensured that the set bounding box of all the XML geometries does not exceed 10 km2.
<coverage srs=”EPSG:4326”> <trips width=”2”> <geometry>LINESTRING()</geometry> <geometry>LINESTRING()</geometry> <geometry>MULTILINESTRING()</geometry> </trips> <zones> <zone id=”1”> <geometry>LINESTRING()</geometry> <geometry>LINESTRING()</geometry> <geometry>MULTILINESTRING()</geometry> </zone> <zone id=”2”> <geometry>POLYGON(())</geometry> </zone> <zone id=”3”> <geometry>POLYGON(())</geometry> </zone> </zones> </coverage>
<cercalia cmd="coverage" version="1"> <coverage percent=”56.4”> <zones> <zone id=”1” percent=”10.11”> <zone id=”2” percent=”50.12”> <zone id=”3” percent=”75.12”> </zones> <img center="314323,5129642" format="png" height="250" href="/MapesNG/Cercalia/map/map65/48126316709.png" width="350"> <extent> <coord x="310850" y="5132122"> <coord x="317795" y="5127162"> </extent> </img> </coverage>
In the <coverage> tag you get the global percentage of coverage over all zones. Each zone also includes the coverage percentage.
In addition, the <img> tag shows the dimensions and extension of the image. This image can be retrieved by forming a URL with the host that has served the request and the content of the <href> tag. Following the example: