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

Home » Public Forums » archive » Finding a points inside polygon
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Finding a points inside polygon [message #32651] Thu, 24 October 2002 06:32
Gunho Sohn is currently offline  Gunho Sohn
Messages: 3
Registered: October 2002
Junior Member
Dear All,

I have a problem to determine whether a point (x,y) is inside the polygon.
Simply I've used IDLanROI::ContainsPoints method in my code. However, it
seems to make a serious problem. Please, check this problem together. I used
following polygons and point

polygon vertices (vx,vy):
vx=[35.859278 55.591451 155.00000 155.00000]
vy=[0.00000000 0.00000000 19.279154 23.105984]

point (x,y):
x=122.87897 y=13.049367

When I simply coded this as follows, it printes as 0 which means this point
is located outside of polygon. But, it is not!
o_poly=obj_new('IDLanROI', vx,vy)
print, o_poly->ContainsPoints(x,y)

I compared this using fanning's inside.pro, as I expected 'inside.pro' said
this point is in the polygon.

Do I something wrong using IDLanROI object?

I hope to hear anything from you soon.


Many thanks,

Gunho
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDLWAVE 4.16 -- idlwave.org
Next Topic: MODIS Bowtie

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

Current Time: Fri Oct 10 11:15:13 PDT 2025

Total time taken to generate the page: 0.64247 seconds