comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Understanding IDLanROI
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Understanding IDLanROI [message #73088 is a reply to message #72990] Fri, 22 October 2010 07:16 Go to previous messageGo to previous message
KRDean is currently offline  KRDean
Messages: 69
Registered: July 2006
Member
On Oct 20, 11:01 am, Guillermo
<guillermo.castilla.castell...@gmail.com> wrote:
> kBob writes:
>>  I am attempting to use IDLanROI to determine if Shapefiles overlap
>> another Shapefile...
>> When I tried to use the US shapefile in IDLanROI (and IDLgrROI) there
>> was a line running across the United States from the Northeast to
>> Hawaii.
>
> I think what happened is that when you created those ROI objects, you
> provided the entire set of vertices that define the shape of the US as
> a single part, and then the last vertex of the ring defining the
> conterminous US got connected with the 1st vertex in Hawaii, hence the
> line you mention. I think the IDLanROIGroup::ContainsPoints method
> should work properly if you create the corresponding object by adding
> sequentially the parts in the US shapefile entity, providing neither
> of the parts are holes (e.g., imagine that Colorado had successfully
> opted out of the Union; the ring defining its shape would be a hole,
> and its vertices would be listed counterclockwise in the shapefile
> entity). Since afaik there are no holes in the US territory, the above
> method should work without having to resort to the tessellator or
> other graphic object classes.
>
> But in a more general application (i.e., where there are polygons with
> holes), I wonder what would be the way to find out whether a point is
> inside a polygon that contain holes. The IDLanROIGroup cannot be used
> for that, as there is no way to specify that a given ROI within the
> groups is actually a hole. The easiest solution would be that the
> ITTVIS folks implement the IDLffShape::ContainsPoints method. Now that
> there is a larger interest to integrate image analysis with vector
> GIS, there is some hope that this will happen in a future release...
>
> Guillermo

Your right, the Tessellator is not required. I just have to perform
the ContainsPoints() on the individual shapefile parts.

To find the polygons that are holes, I use the IDL routine POLY_AREA.
The /SIGNED keyword returns the area as either positive or negative,
which tells you if the vertices are counterclockwise or clockwise. All
the State polygons from states.shp are clockwise.

Kelly
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Still missing features in IDL 8
Next Topic: Subtracting arrays of same dimension, different size - interpolating one to fit the other

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 06:35:24 PDT 2025

Total time taken to generate the page: 0.47510 seconds