7

Is there a good javascript library for complex geometry like: convex hull, polygon intersection (polygons with holes), polygon decomposition and polygon merging ?

I heavily need polygon geometry, but it would be nice if there are more features...

Greetings...

LarsH
  • 27,481
  • 8
  • 94
  • 152
philipp
  • 15,947
  • 15
  • 61
  • 106

4 Answers4

3

you can use the KevLinDev JS lib which contains a lot of 2D and 3D geometry calculation like intersection, isPointInPolygon,...

http://www.kevlindev.com/geometry/index.htm

I think it is free.

sth
  • 222,467
  • 53
  • 283
  • 367
  • wow... nice!! I will check it out! – philipp Jan 19 '13 at 09:18
  • 1
    That's an impressive library, but I can find no mention of a license anywhere on his site. And all the js files have a copyright notice at the top, that's not promising :( – Martin Feb 06 '13 at 16:37
2

I have written my own library named PolyK for polygon computations. Currently it has polygon-point intersection, polygon triangulation and slicing polygon with a line segment.

Ivan Kuckir
  • 2,327
  • 3
  • 27
  • 46
0

csg.js might do what you are looking for:

http://evanw.github.com/csg.js/

The project is still fresh, though.

Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
0

I am not sure if this would work but google as a javascript api for computation of geometric data on the surface of the Earth. You should be able to use a lot of its functionality without actually connecting to google maps. Have a looksee if your interested. http://code.google.com/apis/maps/documentation/javascript/geometry.html

flyingCaffine
  • 382
  • 1
  • 4
  • 9