comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Subset point data using shape file
items: Re: Subset point data using shape file

Subset point data using shape file
type: item
description: Hello, I am very new to the group and somewhat new to IDL. I am trying to subset geographic point data using a shapefile. The points are organized into tracks. The shape is an irregularly shaped polygon and the tracks 'cross over' the shape in many different orientations. I only want the points from each track that are inside the shapefile to be processed and exported.I have hundreds of tracks for a single shapefile. Accessing the polygons vertices and bounds has been relatively straightforward, I am just unsure of how to proceed to subset the data using this information. I did subset the tracks using the latitude range of the bounding box, but this still leaves me with points that are outside my shapefile (e.g. for tracks that cut diagonally across near the top left of the bounding box/shape) This is a relatively simple task in ESRI ArcGIS or similar (at least track by track), but feel that it should be possible to do this in IDL. If not, I will just use ArcGIS python bindings. Any help, thoughts, advice would be appreciated. I am using IDL 8.2, no ENVI license. Cheers Justin
creator: Justin Beckers
date: 2013-07-01T12:58:56-00:00

Re: Subset point data using shape file
type: item
description: Justin Beckers writes: > Accessing the polygons vertices and bounds has been relatively straightforward, I am just unsure of how to proceed to subset the data using this information. I did subset the tracks using the latitude range of the bounding box, but this still leaves me with points that are outside my shapefile (e.g. for tracks that cut diagonally across near the top left of the bounding box/shape) You can find an article, with a couple of functions, for finding whether a point is inside a polygon here: http://www.idlcoyote.com/tips/point_in_polygon.html Ronn Kling also has an algorithm that I hear is very good: http://www.rlkling.com/cool-stuff.htm Cheers, David -- David Fanning, Ph.D. Fanning Software Consulting, Inc. Coyote's Guide to IDL Programming: http://www.idlcoyote.com/ Sepore ma de ni thue. ("Perhaps thou speakest truth.")
creator: David Fanning
date: 2013-07-01T13:13:30-00:00

Re: Subset point data using shape file
type: item
description: Thanks for your reply and help and for the Coyote suite. Cheers Justin On Monday, July 1, 2013 3:13:30 PM UTC+2, David Fanning wrote: > Justin Beckers writes: > > > >> Accessing the polygons vertices and bounds has been relatively straightforward, I am just unsure of how to proceed to subset the data using this information. I did subset the tracks using the latitude range of the bounding box, but this still leaves me with points that are outside my shapefile (e.g. for tracks that cut diagonally across near the top left of the bounding box/shape) > > > > You can find an article, with a couple of functions, for finding whether > > a point is inside a polygon here: > > > > http://www.idlcoyote.com/tips/point_in_polygon.html > > > > Ronn Kling also has an algorithm that I hear is very good: > > > > http://www.rlkling.com/cool-stuff.htm > > > > Cheers, > > > > David > > > > -- > > David Fanning, Ph.D. > > Fanning Software Consulting, Inc. > > Coyote's Guide to IDL Programming: http://www.idlcoyote.com/ > > Sepore ma de ni thue. ("Perhaps thou speakest truth.")
creator: Justin Beckers
date: 2013-07-03T11:17:13-00:00