Recommended geometry frameworks for mapping usecases

This forum covers all questions dealing with visualization of data within the native PTV xMap interface. Please remember that additional plugins such as AJAX or Leaflet may be handeled in other forums.

Recommended geometry frameworks for mapping usecases

Postby Bernd Welter » Fri Dec 22, 2017 11:43 am

Hi there,

every once in a while I get asked for topics such as

  • how to calculate a meaningful (convex?) polygon that contains a set of coordinates (e.g. my customers)?
  • how to determine the post code area that contains a given point?
  • how to determine whether two areas intersect
Such questions are dealing with geometry operations which are usually outside the functional scope of PTVs components.
Depending on the runtime you use (Java, .NET, JavaScript, ... ) you can use third party / open source libraries that offer geometry functions such as

  • POLYGON intersection (POLYGON, POLYGON)
  • BOOLEAN point in polygon(POLYGON, POINT)
  • POLYGON convexhull(POINTS[])

Some frameworks we can recommend for that are

Even Microsoft SQL Server or Oracle databases support these functions. The term you have to look for is SPATIAL: ... sql-server

Of course sometimes you also need geometry data such as ZIPCODE areas or COUNTRY borders but that is a question of data broking which can be provided by PTV's Digital Data Services (

Best regards,
Bernd Welter
Manager Technical Consulting & Requirement Engineering
Senior Technical Consultant Developer Components
PTV GROUP - Germany

Bernd at Youtube
User avatar
Bernd Welter
Site Admin
Posts: 1027
Joined: Mon Apr 14, 2014 10:28 am

Re: Recommended geometry frameworks for mapping usecases

Postby Oliver Heilig » Fri Dec 22, 2017 1:16 pm

Some additions, with actual samples:

.NET (Framework)

Reading/Writing data-formats, Map-Rendering SharpMap
Sample with xServer


Simple mapping functions (geo-distance / pointInPolygon) Leaflet + Plugins.
Sample with xServer:

Complex functions (working with TopoJson / Topologies) D3
Sample with xSever:

Voronoi-Diagrams: D3-Voronoi
Sample with xServer:

Oliver Heilig
Chief Developer
PTV GROUP - Germany
User avatar
Oliver Heilig
Posts: 97
Joined: Tue May 13, 2014 12:10 pm
Location: Karlsruhe, Germany

Return to PTV xMapServer