<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>RE: [geos-devel] question about GEOSUnion?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>LiN YongHeng,<BR>
<BR>
Its best to change the subject line if you must reply to a digest and cut out all non-relevant stuff.<BR>
<BR>
Now getting back to your question. I don't use GEOS directly but thru PostGIS, but I presume it behaves the same.<BR>
<BR>
1) There is no such thing as LINE. If I try that I get invalid geometry, but maybe GEOS doesn't validate that and function then does somethig strange with it.<BR>
<BR>
It should be<BR>
LINESTRING(1 3,1 6)<BR>
<BR>
2) When I do Envelope of LINESTRING(1 3, 3 6)<BR>
<BR>
I get<BR>
LINESTRING(1 3,1 6)<BR>
<BR>
3) Which version of GEOS are you using?<BR>
<BR>
Hope that helps,<BR>
Regina<BR>
-----Original Message-----<BR>
From: geos-devel-bounces@lists.osgeo.org on behalf of LiN YongHeng<BR>
Sent: Mon 4/13/2009 9:31 PM<BR>
To: geos-devel@lists.osgeo.org<BR>
Subject: [geos-devel] Re: geos-devel Digest, Vol 78, Issue 10<BR>
<BR>
Hello,everyone,<BR>
If you say that my geometry is invalid, it means that GeosEnvelop return a<BR>
invalid geometry. I use the<BR>
GeosEnvelop("LINE(1 3,1 6)") and it return the geometry like<BR>
GEOSGeom g2 = "POLYGON ((1 3, 1 3, 1 6, 1 6, 1 3))".<BR>
After I use the GEOSUnion, it give me result like "GEOMETRYCOLLECTION<BR>
EMPTY". Does anyone can<BR>
tell me how to do that?<BR>
2009/4/14 <geos-devel-request@lists.osgeo.org><BR>
<BR>
> Message: 1<BR>
> Date: Mon, 13 Apr 2009 09:17:11 +0800<BR>
> From: LiN YongHeng <bicealyh@gmail.com><BR>
> Subject: [geos-devel] question about GEOSUnion?<BR>
> To: geos-devel@lists.osgeo.org<BR>
> Message-ID:<BR>
> <11e4f1140904121817o3acb3f0eo5c0203551d6b9cdc@mail.gmail.com><BR>
> Content-Type: text/plain; charset="iso-8859-1"<BR>
><BR>
> Hello everyone,<BR>
> I have a question about GEOSUnion().<BR>
> I give value to g1 and g2 like below:<BR>
> GEOSGeom g1 = "POLYGON ((1 3, 1 3, 1 6, 1 6, 1 3))" and GEOSGeom g2 =<BR>
> "POLYGON ((1 3, 1 3, 1 6, 1 6, 1 3))" , but if I make union operation<BR>
> like GEOSGeom g3 =<BR>
> GEOSUnion(g1, g2), it give me result like "GEOMETRYCOLLECTION EMPTY".<BR>
> Does anyone can tell me why?<BR>
> -------------- next part --------------<BR>
> An HTML attachment was scrubbed...<BR>
> URL:<BR>
> <A HREF="http://lists.osgeo.org/pipermail/geos-devel/attachments/20090413/38a437e5/attachment-0001.html">http://lists.osgeo.org/pipermail/geos-devel/attachments/20090413/38a437e5/attachment-0001.html</A><BR>
><BR>
> ------------------------------<BR>
><BR>
> Message: 2<BR>
> Date: Mon, 13 Apr 2009 01:32:38 -0400<BR>
> From: "Obe, Regina" <robe.dnd@cityofboston.gov><BR>
> Subject: RE: [geos-devel] question about GEOSUnion?<BR>
> To: "GEOS Development List" <geos-devel@lists.osgeo.org><BR>
> Message-ID:<BR>
> <53F9CF533E1AA14EA1F8C5C08ABC08D204D7F27F@ZDND.DND.boston.cob><BR>
> Content-Type: text/plain; charset="iso-8859-1"<BR>
><BR>
> LiN YongHeng,<BR>
><BR>
> your geometry is invalid since first you don't have enough points to form a<BR>
> polygon after you remove the dupes and second you have self intersections.<BR>
> Therefore the union is undefined at best.<BR>
><BR>
> Hope that helps,<BR>
> Regina<BR>
><BR>
><BR>
> -----Original Message-----<BR>
> From: geos-devel-bounces@lists.osgeo.org on behalf of LiN YongHeng<BR>
> Sent: Sun 4/12/2009 9:17 PM<BR>
> To: geos-devel@lists.osgeo.org<BR>
> Subject: [geos-devel] question about GEOSUnion?<BR>
><BR>
> Hello everyone,<BR>
> I have a question about GEOSUnion().<BR>
> I give value to g1 and g2 like below:<BR>
> GEOSGeom g1 = "POLYGON ((1 3, 1 3, 1 6, 1 6, 1 3))" and GEOSGeom g2 =<BR>
> "POLYGON ((1 3, 1 3, 1 6, 1 6, 1 3))" , but if I make union operation<BR>
> like GEOSGeom g3 =<BR>
> GEOSUnion(g1, g2), it give me result like "GEOMETRYCOLLECTION EMPTY".<BR>
> Does anyone can tell me why?<BR>
><BR>
><BR>
><BR>
> -----------------------------------------<BR>
> The substance of this message, including any attachments, may be<BR>
> confidential, legally privileged and/or exempt from disclosure<BR>
> pursuant to Massachusetts law. It is intended<BR>
> solely for the addressee. If you received this in error, please<BR>
> contact the sender and delete the material from any computer.<BR>
> -------------- next part --------------<BR>
> An HTML attachment was scrubbed...<BR>
> URL:<BR>
> <A HREF="http://lists.osgeo.org/pipermail/geos-devel/attachments/20090413/dddedf6a/attachment-0001.html">http://lists.osgeo.org/pipermail/geos-devel/attachments/20090413/dddedf6a/attachment-0001.html</A><BR>
><BR>
> ------------------------------<BR>
><BR>
> Message: 3<BR>
> Date: Mon, 13 Apr 2009 10:16:41 +0100<BR>
> From: Mateusz Loskot <mateusz@loskot.net><BR>
> Subject: Re: [geos-devel] question about GEOSUnion?<BR>
> To: GEOS Development List <geos-devel@lists.osgeo.org><BR>
> Message-ID: <49E302F9.2000008@loskot.net><BR>
> Content-Type: text/plain; charset=ISO-8859-1<BR>
><BR>
> LiN YongHeng wrote:<BR>
> > Hello everyone, I have a question about GEOSUnion(). I give value to<BR>
> > g1 and g2 like below: GEOSGeom g1 = "POLYGON ((1 3, 1 3, 1 6, 1 6,<BR>
> > 1 3))" and GEOSGeom g2 = "POLYGON ((1 3, 1 3, 1 6, 1 6, 1 3))"<BR>
> > , but if I make union operation like GEOSGeom g3 = GEOSUnion(g1, g2),<BR>
> > it give me result like "GEOMETRYCOLLECTION EMPTY". Does anyone can<BR>
> > tell me why?<BR>
><BR>
> LiN YongHeng,<BR>
><BR>
> In order to be able to use GEOS or PostGIS, you need to read and<BR>
> understand some basic informations included in the OGC Simple Feature<BR>
> Specification<BR>
><BR>
> <A HREF="http://www.opengeospatial.org/standards/sfs">http://www.opengeospatial.org/standards/sfs</A><BR>
><BR>
> Otherwise, you will be hit the wall when you try to use every function.<BR>
><BR>
> Best regards,<BR>
> --<BR>
> Mateusz Loskot, <A HREF="http://mateusz.loskot.net">http://mateusz.loskot.net</A><BR>
> Charter Member of OSGeo, <A HREF="http://osgeo.org">http://osgeo.org</A><BR>
><BR>
><BR>
> ------------------------------<BR>
><BR>
> _______________________________________________<BR>
> geos-devel mailing list<BR>
> geos-devel@lists.osgeo.org<BR>
> <A HREF="http://lists.osgeo.org/mailman/listinfo/geos-devel">http://lists.osgeo.org/mailman/listinfo/geos-devel</A><BR>
><BR>
> End of geos-devel Digest, Vol 78, Issue 10<BR>
> ******************************************<BR>
><BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>