This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Zone visit analysis

Calculate if a vehicle has passed through all the planned streets and squares, using raster analysis technology.

    API Access

    The Zone Visit Analysis API calculates if a vehicle has passed through all planned streets and squares using raster analysis technology.

    Base Service URLs:

    • Supported methods: GET or POST
    • Response formats: JSON / XML

    Zone Visit Analysis

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

    Use an HTTP POST request. Call parameters:

    ParameterDescription
    cmdcoverage (Coverage analysis request)
    xmlXML document with this format: cercaliaCoverage.xsd

    XML document format:

    schema XML análisis cobertura

    Description:

    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. Images larger than 10,000 x 10,000 pixels cannot be generated. Therefore, ensure that the bounding box of all XML geometries does not exceed 10 km².

    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 Structure

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

    Response Description:

    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 served the request and the content of the <href> tag. Following the example format:

    https://lb.cercalia.com/MapesNG/Cercalia/map/map65/48126316709.png