[postgis-users] Function for creating TIN using tripack fortran codes

Hisaji ONO hi-ono at mn.xdsl.ne.jp
Wed Jun 5 07:26:04 PDT 2002


Hello.

 I tried to create a function for creating TIN from MULTIPOINT
experimentally using tripack(fortran TIN library ) available from
http://cran.r-project.org/src/contrib/tripack_1.2-3.tar.gz. This function
outputs TIN as a MULTIPOLYGON. I used tripack's two fortan codes. They are
ACM's, and free for ***noncommercial*** use.

 I attached two files "tin.c" and "Makefile.g77", a modified original make
file. For compiling my program, please execute "make -f Makefile.g77" in
PostGIS's source existing directory.

 For defining this function, run following function in psql client
program(this is an example in Cygwin Environment).

  CREATE FUNCTION tin(GEOMETRY)
  RETURNS GEOMETRY
  AS 'C:/cygwin/usr/src/postgresql-7.2.1/contrib/postgis-0.7.1/postgis.dll',
'create_tin'
  LANGUAGE 'c'  with (isstrict);

For using this function:

   select tin(collect(the_geom)) from point_table;

 For creating TIN, your need more than 3 points.

  Sorry, I'm newbie for creating PostgreSQL's function by C, I don't know
how to output each triangle with its ID, useful triangle's info(neighbor
triangles, its lines' IDs and its points' IDs) in this function. Could you
tell me any suggestion about this?

 Thanks for Mr. Nicholas Ribot's programs for functions using GPC,  I've
managed to create this program.

 Best Regards.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tin.c
Type: application/octet-stream
Size: 7642 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20020605/96b5d9ed/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile.g77
Type: application/octet-stream
Size: 3428 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20020605/96b5d9ed/attachment-0001.obj>


More information about the postgis-users mailing list