[geos-devel] multipart polygon
Martin Davis
mbdavis at VividSolutions.com
Fri Sep 3 11:37:10 EDT 2004
If you look at the checkNotGeometryCollection method you'll notice that it's only checking for classes which are actually a GeometryCollection, not an extension of it.
Martin Davis, Senior Technical Architect
Vivid Solutions Inc. www.vividsolutions.com
Suite #1A-2328 Government Street Victoria, B.C. V8T 5G5
Phone: (250) 385 6040 - Local 308 Fax: (250) 385 6046
> -----Original Message-----
> From: zhangjing [mailto:jingzhang at cbigroup.com]
> Sent: September 2, 2004 9:54 PM
> To: GEOS Development List
> Subject: Re: [geos-devel] multipart polygon
>
>
> hi,
> thanks for ur replies,but from source code, i think all
> the topo operations call checkNotGeometryCollection first.
> so how can multipolygon supports topo operrations like union.
>
> Geometry*
> Geometry::Union(const Geometry *other) const
> //throw(TopologyException *, IllegalArgumentException *)
> {
> checkNotGeometryCollection(this);
> checkNotGeometryCollection(other);
> }
>
> void
> Geometry::checkNotGeometryCollection(const Geometry *g)
> //throw(IllegalArgumentException *)
> {
> if ((typeid(*g)==typeid(GeometryCollection))) {
> throw new IllegalArgumentException("This method
> does not support GeometryCollection arguments\n");
> }
> }
>
> class MultiPolygon: public GeometryCollection {
> }
>
>
>
> >Multipolygons do support holes (they are simply collections of
> >non-overlapping polygons), and they do support all geometry
> operations.
> >
> >Martin Davis, Senior Technical Architect
> >Vivid Solutions Inc. www.vividsolutions.com
> >Suite #1A-2328 Government Street Victoria, B.C. V8T 5G5
> >Phone: (250) 385 6040 - Local 308 Fax: (250) 385 6046
> >
> >
> >> -----Original Message-----
> >> From: zhangjing [mailto:jingzhang at cbigroup.com]
> >> Sent: September 1, 2004 8:37 PM
> >> To: geos-devel at geos.refractions.net
> >> Subject: [geos-devel] multipart polygon
> >>
> >>
> >> hi all,
> >> i wonder how can i use multipart polygon in geos, i think
> >> that polygon class only support single part polygon with
> >> holes , and multipolygon class does not support topological
> >> operations. and how can i support multipart polygon in my program.
> >>
> >> Best Regard.
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> geos-devel mailing list
> >> geos-devel at geos.refractions.net
> >> http://geos.refractions.net/mailman/listinfo/g> eos-devel
> >>
> >_______________________________________________
> >geos-devel mailing list
> >geos-devel at geos.refractions.net
> >http://geos.refractions.net/mailman/listinfo/geos-devel
>
> = = = = = = = = = = = = = = = = = = = =
>
>
> 致
> 礼!
>
>
> zhangjing
> jingzhang at cbigroup.com
> 2004-09-03
>
>
>
> _______________________________________________
> geos-devel mailing list
> geos-devel at geos.refractions.net
> http://geos.refractions.net/mailman/listinfo/g> eos-devel
>
More information about the geos-devel
mailing list