[postgis-devel] Creating a POINTARRAY, what's the best way?

Jorge Arévalo jorge.arevalo at deimos-space.com
Thu May 26 06:57:20 PDT 2011


Hello,

Looking at liblwgeom code, I've found 2 ways of creating a POINTARRAY
object from a list of points:

- ptarray_construct/ptarray_insert_point/ptarray_append_point
- wkt_parser_ptarray_new/wkt_parser_ptarray_add_coord

What method should I use and why?

Apart from this, I see "POINT" objects defined in 3 ways:

- POINT(flags, x, y, z, m) in lwin_wkt.h
- POINT2D/POINT3DZ/POINT3D/POINT3DM/POINT4D in liblwgeom.h
- LWPOINT(type, flags, bbox, srid, point) in liblwgeom.h.

The difference between the two last types of points is clear (a
"light-weight point" stores more info than simply coords), but what's
the difference between "POINT" and "POINT4D". They're equal. What
should I use?

Many thanks in advance,

-- 
Jorge Arévalo
Internet & Mobilty Division, DEIMOS
jorge.arevalo at deimos-space.com
http://es.linkedin.com/in/jorgearevalo80
http://mobility.grupodeimos.com/
http://gis4free.wordpress.com
http://geohash.org/ezjqgrgzz0g



More information about the postgis-devel mailing list