Recommended geometry frameworks for mapping usecases

This forum covers all questions dealing with visualization of data within the native PTV xMap interface and the
PTV Developer Raster Maps API
Please remember that additional plugins such as AJAX or Leaflet may be handeled in other forums.
Post Reply
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Recommended geometry frameworks for mapping usecases

Post by Bernd Welter »

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
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
User avatar
Oliver Heilig
Posts: 160
Joined: Tue May 13, 2014 12:10 pm
Location: Karlsruhe, Germany
Contact:

Re: Recommended geometry frameworks for mapping usecases

Post by Oliver Heilig »

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/xserve ... oi-locator

Complex functions (working with TopoJson / Topologies) D3 https://d3js.org/.
Sample with xSever: https://github.com/ptv-logistics/xserve ... in-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 Logistic Services
PTV GROUP - Germany

https://github.com/oliverheilig/
Post Reply