Zone visit analysis

Web services

Zone visit analysis documentation, avaliable via

HTTP-JSON/XML service.

URL base service:

* 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.


REQUEST:

Use a HTTP POST request. Call parameters:

CMD=coverage

Coverage analysis request

KEY

API KEY. Same KEY used in maps API js

XML

XML document, with this format: cercaliaCoverage.xsd

XML document format:

schema XML análisis cobertura

Where:

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.


XML Example:

<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>

 

RESPONSE:

<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:

http://ws.cercalia.com/MapesNG/Cercalia/map/map65/48126316709.png