[postgis-users] Donut-Polygon
Simon Greener
simon at spatialdbadvisor.com
Fri Feb 6 16:26:46 PST 2009
After your request to filter by ID I modified the Oracle version of my filter_rings() function to allow one to nominate an area or the id of an inner ring. I will modify the PostGIS version next week and modify the article.
Glad I (and Regina) could help.
S
On Sat, 07 Feb 2009 04:02:30 +1100, Albert Krueger <albert79 at lycos.de> wrote:
> Thanks for your immediate answer. Exactly, I would like to filter by area. So your blog, Simon, was a very great help for me.
>
> Many thanks for your help.
>
> Greetings! Albert
>
>> Von: "Simon Greener" <simon at spatialdbadvisor.com>
>> An: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
>> Betreff: Re: [postgis-users] Donut-Polygon
>> Datum: Fri, 06 Feb 2009 10:57:14 +1100
>
>> Or, if you want to filter by area (POLYGON and MULTIPOLYGON), see this: <a
>> target="_blank"
>> href='http://www.spatialdbadvisor.com/postgis_tips_tricks/92/filtering-rings
>> -in-polygon-postgis'>http://www.spatialdbadvisor.com/postgis_tips_tricks/92/
>> filtering-rings-in-polygon-postgis</a>
>> regards
>> Simon
>> On Fri, 06 Feb 2009 05:29:15 +1100, Kevin Neufeld
>> <<a href=mailto:"kneufeld at refractions.net">kneufeld at refractions.net</a>> wrote:
>>
>> > Use ST_DumpRings to extract the rings, then exclude the ones you don't
>> want and then rebuild your polygon.
>> > <a target="_blank"
>> href='http://postgis.refractions.net/documentation/manual-svn/ST_DumpRings.h
>> tml'>http://postgis.refractions.net/documentation/manual-svn/ST_DumpRings.ht
>> ml</a>
>> >
>> > ie.
>> > -- A polygon with 6 inner rings, we exclude all but rings 3 and 5
>> > SELECT ST_AsText(ST_BuildArea(ST_Collect(geom))) AS the_geom
>> > FROM (SELECT (ST_DumpRings(
>> > 'POLYGON (( 0 0, 0 7, 10 7, 10 0, 0 0 ),
>> > ( 1 4, 3 4, 3 6, 1 6, 1 4 ),
>> > ( 4 4, 6 4, 6 6, 4 6, 4 4 ),
>> > ( 7 4, 9 4, 9 6, 7 6, 7 4 ),
>> > ( 1 1, 3 1, 3 3, 1 3, 1 1 ),
>> > ( 4 1, 6 1, 6 3, 4 3, 4 1 ),
>> > ( 7 1, 9 1, 9 3, 7 3, 7 1 )
>> > )'::geometry)).*) AS foo
>> > WHERE NOT ( ARRAY[1,2,4,6] @> path );
>> >
>> > the_geom
>> >
>> ----------------------------------------------------------------------------
>> --
>> > POLYGON((0 0,0 7,10 7,10 0,0 0),(7 4,9 4,9 6,7 6,7 4),(4 1,6 1,6 3,4
>> 3,4 1))
>> > (1 row)
>> >
>> > Cheers,
>> > Kevin
>> >
>> > Albert Krueger wrote:
>> >> Hi at all,
>> >>
>> >> I have a Donut-Polygon with a number of Innerrings. Now I would like to
>> >> delete some Innerrings. For Example I have a polygon with five
>> >> Innerrings. ButI want to delete the second and the fourth Innerring. Has
>> >> anyone an idea how I can get a polygon with only three Innerrings
>> >> (1,3,5) then?
>> >>
>> >> Thank you!
>> >>
>> >> Best regards
>> >>
>> >> Albert
>> >>
>> >>
>> >> _________________________________
>> >> LOVE at LYCOS ist jetzt ganz neu - melde dich kostenlos an, lerne neue
>> >> Leute kennen und finde deinen Flirt!
>> >> Jetzt flirten!
>> >> <<a target="_blank"
>> href='http://bc.lycos-europe.net/lnl/bc.php?loveatlycos_promo_mailsig|http:/
>> /love.lycos.de/start.action?utm_campaign=mp&utm_source=mailsig>'>http://bc.l
>> ycos-europe.net/lnl/bc.php?loveatlycos_promo_mailsig|http://love.lycos.de/st
>> art.action?utm_campaign=mp&utm_source=mailsig></a>
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------
>> >>
>> >> _______________________________________________
>> >> postgis-users mailing list
>> >> postgis-users at postgis.refractions.net
>> >> <a target="_blank"
>> href='http://postgis.refractions.net/mailman/listinfo/postgis-users'>http://
>> postgis.refractions.net/mailman/listinfo/postgis-users</a>
>> > _______________________________________________
>> > postgis-users mailing list
>> > postgis-users at postgis.refractions.net
>> > <a target="_blank"
>> href='http://postgis.refractions.net/mailman/listinfo/postgis-users'>http://
>> postgis.refractions.net/mailman/listinfo/postgis-users</a>
>> >
>>
>>
>>
>> --
>> SpatialDB Advice and Design, Solutions Architecture and Programming,
>> Oracle Database 10g Administrator Certified Associate; Oracle Database 10g
>> SQL Certified Professional
>> Oracle Spatial, SQL Server, PostGIS, MySQL, ArcSDE, Manifold GIS, FME,
>> Radius Topology and Studio Specialist.
>> 39 Cliff View Drive, Allens Rivulet, 7150, Tasmania, Australia.
>> Website: www.spatialdbadvisor.com
>> Email: <a href=mailto:"simon at spatialdbadvisor.com">simon at spatialdbadvisor.com</a>
>> Voice: +613 9016 3910
>> Mobile: +61 418 396391
>> Skype: sggreener
>> Longitude: 147.20515 (147° 12' 18" E)
>> Latitude: -43.01530 (43° 00' 55" S)
>> NAC:W80CK 7SWP3
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> <a target="_blank"
>> href='http://postgis.refractions.net/mailman/listinfo/postgis-users'>http://
>> postgis.refractions.net/mailman/listinfo/postgis-users</a>
>
> LOVE at LYCOS ist jetzt ganz neu ? melde dich kostenlos an, lerne neue Leute kennen und finde deinen Flirt! http://love.lycos.de/start.action
--
SpatialDB Advice and Design, Solutions Architecture and Programming,
Oracle Database 10g Administrator Certified Associate; Oracle Database 10g SQL Certified Professional
Oracle Spatial, SQL Server, PostGIS, MySQL, ArcSDE, Manifold GIS, FME, Radius Topology and Studio Specialist.
39 Cliff View Drive, Allens Rivulet, 7150, Tasmania, Australia.
Website: www.spatialdbadvisor.com
Email: simon at spatialdbadvisor.com
Voice: +613 9016 3910
Mobile: +61 418 396391
Skype: sggreener
Longitude: 147.20515 (147° 12' 18" E)
Latitude: -43.01530 (43° 00' 55" S)
NAC:W80CK 7SWP3
More information about the postgis-users
mailing list