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[])
  • BOOLEAN intersects(POLYGON,POLYGON)

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:
https://docs.microsoft.com/en-us/sql/re ... 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 (http://www.ddsgeo.de/)

Best regards,
Bernd
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 https://www.nuget.org/packages/SharpMap/.
Sample with xServer https://github.com/ptv-logistics/SharpMap.Widgets

JS

Simple mapping functions (geo-distance / pointInPolygon) Leaflet + Plugins.
Sample with xServer: https://github.com/ptv-logistics/xserverjs/tree/master/premium-samples/poi-locator

Complex functions (working with TopoJson / Topologies) D3 https://d3js.org/.
Sample with xSever: https://github.com/ptv-logistics/xserverjs/tree/master/premium-samples/admin-regions

Voronoi-Diagrams: D3-Voronoi https://github.com/d3/d3-voronoi
Sample with xServer: https://github.com/oliverheilig/voronoi-territories

Oli
Oliver Heilig
Chief Developer
PTV GROUP - Germany

https://github.com/oliverheilig/
User avatar
Oliver Heilig
 
Posts: 97
Joined: Tue May 13, 2014 12:10 pm
Location: Karlsruhe, Germany


Return to PTV xMapServer

cron