Section B.3. Rules for Preparing Polygon Data


B.3. Rules for Preparing Polygon Data

You can manually create an XML file that contains the polygon data; however, the resulting XML file must contain the following requirements:

  • An embedded XSD schema with two namespaces :

    • xsd, which references http://www.w3.org/2001/XMLSchema

    • od, which references urn:schemas-microsoft-com:officedata

  • A dataroot element, that contains:

    • One or more CustomerPolygonEntity elements

    • A generated attribute, which is set to a date-time value (for example, generated="2004-05-21T17:11:40")

The CustomerPolygonEntity element must contain the following elements:


EntityID

Unique ID within the given data source.


Latitude

If you do not provide this value, MapPoint Web Service calculates the latitude value and adds it during the upload process.


Longitude

If you do not provide this value, MapPoint Web Service calculates the Longitude value and adds it during the upload process.


EntityGeometry

References poly namespace http://s.mappoint.net/polygon-40/.

The EntityGeometry element must contain a Polygon element. The Polygon element contains:

  • One ExteriorRing element

  • Zero or more InteriorRing elements

  • The value for an ExteriorRing or InteriorRing element is a list of latitude and longitude coordinate pairs separated by semicolons with no semicolon at the end of the list and with no spaces between any charactersfor example, latitude1,longitude1;latitude2,longitude2

The following rules apply to the polygons in the ExteriorRing or InteriorRing element:

  • Each vertex is defined by a pair of latitude and longitude coordinate values.

  • No two latitude and longitude pairs can be the same within a polygon.

  • You do not need to close the polygon by specifying the final vertex of a polygon, as this will be a duplicate of the first vertex.

  • Internal polygons cannot overlap or intersect external polygons.

  • Each ring you define must contain at least three vertices.




Programming MapPoint in  .NET
Programming MapPoint in .NET
ISBN: 0596009062
EAN: 2147483647
Year: 2005
Pages: 136
Authors: Chandu Thota

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net