[postgis-users] exterior rings in multipolygons
Mr. Puneet Kishor
punk.kish at gmail.com
Tue Jul 26 07:58:23 PDT 2011
On Jul 26, 2011, at 9:56 AM, Sandro Santilli wrote:
> On Tue, Jul 26, 2011 at 09:47:23AM -0500, Mr. Puneet Kishor wrote:
>>
>> On Jul 26, 2011, at 9:34 AM, Sandro Santilli wrote:
>>
>>> On Tue, Jul 26, 2011 at 09:31:50AM -0500, Mr. Puneet Kishor wrote:
>>>
>>>> ERROR: function st_interiorringn(geometry) does not exist
>>>
>>> Check your parens, the call above is missing a parameter (ring number).
>>>
>>
>> That is a bit embarrassing. Yes, I had missed out on giving the ring number. However, still no luck --
>>
>> SELECT objectid,
>> ST_NRings(the_geom) num_of_rings,
>> ST_NumInteriorRings(the_geom) num_of_int_rings,
>> ST_NumPoints(ST_ExteriorRing(ST_GeometryN(the_geom,1))) num_of_points_ext_ring,
>> ST_AsText(the_geom) wkt_feature,
>> ST_AsText(ST_MakePolygon(ST_ExteriorRing(ST_GeometryN(the_geom, 1)))) wkt_ext_ring,
>> ST_AsText(ST_MakePolygon(ST_InteriorRingN(ST_GeometryN(the_geom, 2), 2))) wkt_int_ring_a,
>> ST_AsText(ST_MakePolygon(ST_GeometryN(the_geom, 2))) wkt_int_ring_b
>> FROM table
>> WHERE objectid = 280;
>>
>> objectid: 280;
>> num_of_rings: 4;
>> num_of_int_rings: 3;
>> num_of_points_ext_ring: 496;
>> wkt_feature: "MULTIPOLYGON(((<1>),(<2>),(<3>),(<4>))";
>> wkt_ext_ring: "POLYGON((<1>))";
>> wkt_int_ring_a: "";
>> wkt_int_ring_b: ""
>>
>> As you see, I tried to get the interior ring "n" two different ways. Not getting anywhere.
>
> Write down a matrix of all combinations you tried.
> Use real paper, and pencil.
> Publish a scanned version.
>
That sounds like a great suggestion. Thanks for your help.
Puneet.
More information about the postgis-users
mailing list