VIAMICHELIN SOAP API


PixelsToXY

Description 

This method takes a map definition and an array of pixel coordinates, and converts each pixel coordinates in geographic coordinates. 
Specifications 

  • The maximum number of items in the array is 1000. Beyond this limit, a SOAP fault is returned.
  • The minimum number of items in the array cannot be lower than 1. Otherwise, a SOAP fault is returned.
  • The geographic coordinates used are WGS84 encoded.

Input Parameters 

 Parameter  Mandatory  Description
request (PixelsToXYRequest) true Specifies a map definition (by scale or by identifier) and an array of pixel coordinates to convert.
authenticationParams (String) true Specifies an authentication identifier for accessing Web Service: login + '|' character + password

Output Parameter 

 Parameter  Description
GeoCoordinates Array of geographic coordinates. Each item corresponding to a supplied pixel coordinates.

Use 

To convert geographic coordinates into pixels coordinates using the PixelsToXYRequest you have to specify the following attributes:
  • pixelsList attribute defines the array containing the list of points in pixel coordinates to be converted in geographic coordinates.
  • mapDefinition attribute (see InputMapDefinitionList) contains the definition of the map from which the conversion must be applied.

Note 

This Web service billing is from now based on the number of successful requests received. 
Errors 

 Error code  Description  Possible problems
700 Invalid request value - request value is not defined (null)
701 the list of points in pixel coordinates is invalid - the list of points in pixel coordinates is not defined (null).
- the list of points in pixel coordinates is empty.
- the list of points in pixel coordinates contains more that 1000 items.
702 Invalid map definition - supplied map definition is invalid.
3 Abnormal service termination - internal problem

Code sample (Java)
PixelsToXYRequest request = new PixelsToXYRequest (); 
// ********************************** 
// set Map definition 
// ********************************** 
InputMapDefinitionList mapDefList = new InputMapDefinitionList(); 
MapDefinitionByScale mapDef = new MapDefinitionByScale(); 
mapDef.setPixelSize(400); 
GeoCoordinates center = new GeoCoordinates(); 
center.setLatitude(47.90253160625501); 
center.setLongitude(1.910160025864502); 
mapDef.setCenterPoint(center); 
ImgSize mapsize = new ImgSize(); 
mapsize.setHeight(400); 
mapsize.setWidth(400); 
mapDef.setMapSize(mapsize); 
mapDefList.setByID(mapDef); 
request.setMapDefinition(mapDefList); 

// ********************************** 
// set geographic coordinates list 
// ********************************** 
PixelPoint[] pixelsList = GeoCoordinates coord = new PixelPoint[2]; 
PixelPoint point = null; 

point = new PixelPoint(); 
point.setX(0); 
point.setY(0); 
pixelsList [0] = point; 

point = new PixelPoint(); 
point.setX(400); 
point.setY(400); 
pixelsList [1] = point; 

request.setPixelsList(pixelsList); 

// invoke MapManagement Web Service
MapManagementLocator locator = new MapManagementServiceLocator(); 
MapManagement service = locator.getMapManagement(); 
GeoCoordinates[] result = service. pixelsToXY (request, "YOUR_LOGIN|YOUR_PASSWORD");

Code sample (VB.NET)
Will be available in a future version

Code sample (C#.NET)
Will be available in a future version