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