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

Home » Public Forums » archive » Point within country boundary
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Point within country boundary [message #87319] Fri, 24 January 2014 10:48 Go to previous message
Matt[3] is currently offline  Matt[3]
Messages: 23
Registered: April 2011
Junior Member
Hi All,

I'm trying to find out which countries a set of points fall within. I thought I could do this using the supplied map shapefiles and IDLanROI. However, when I try this:

country_path = "/usr/local/exelis/idl/resource/maps/shape/country.shp"

oSHP = OBJ_NEW('IDLffShape', country_path )
ent1 = oSHP -> GetEntity( 34, /ATTRIBUTES ) ;USA
OBJ_DESTROY, oSHP

oROI = OBJ_NEW('IDLanROI', (*ent1.vertices))
test = oROI -> ContainsPoints([-100.], [35.])
OBJ_DESTROY, oROI

print, test

... I get 0, whereas I'm pretty sure -100E, 35W should be within the USA.

Am I misunderstanding how these objects or shape files should be used?

Thanks in advance for any pointers,

Matt
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: harrisgeospatial unreachable...
Next Topic: Re: Segregating data in bimodal distribution

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

Current Time: Wed Oct 08 09:10:44 PDT 2025

Total time taken to generate the page: 0.00430 seconds