First use

2 messages Options
Embed this post
Permalink
Giacomo Piva

First use

Reply Threaded More More options
Print post
Permalink
Hi All,
I just found the GEOS library, i have just installed and i have my code
(in C) ready to use GEOS.
I see that the C API documentation isn't clear enough for my experience
so I prefer to ask to you to help me to get started with the first lines.

My problem is that I need to get the intersection between two polygons.
So i figure that i can use the:

GEOSGeometry GEOS_DLL *GEOSIntersection function.

So my first problem is to create the Geometry.
Is there a function such as GeometryFromText() wich accept the coordinates of the corners of the polygon?

Thank to all.

P.S. If someone know a simple tutorial to get started, please send me a link.


--
Giacomo Piva

_______________________________________________
geos-devel mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/geos-devel
Jo-4

Re: First use

Reply Threaded More More options
Print post
Permalink

So my first problem is to create the Geometry.
Is there a function such as GeometryFromText() wich accept the coordinates of the corners of the polygon?

Thank to all.

P.S. If someone know a simple tutorial to get started, please send me a link.

Hi,
I think you can use the WKTReader class; instantiate the object, and then use the method read(), passing a stl string with the Well Known Geometry
 

              cheers,
                         Jo

--
"#define QUESTION ((bb) || !(bb))"  (Shakespeare)


_______________________________________________
geos-devel mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/geos-devel