[Gdal-dev] GDAL Capabilities

Tyler Mitchell TMitchell at lignum.com
Wed Jan 21 11:48:01 EST 2004





> program to generate a dynamic polygon based on lat/lon points input
> by the user
> and determine which polygons on a shapefile (us counties) fall within or
> intersect this dynamic polygon.  A simple check to see if the county
> polygons in
> the shapefile fall within or intersect  the dynamic polygon.

Patrick,
I'll take a kick at an answer, then others can correct me or fill in the
gaps.
I would say a general "yes" to your question and would highly recommend
GDAL library for the task.  If there are holes in the functionality for
your specific task, there are bound to be other options (i.e. using the
PostGIS spatial database would allow you to do everything you want, all
using SQL within a database.  You should consider that as well. See
http://postgis.refractions.net).

You can program with GDAL (or more specifically, OGR, the vector subset of
the GDAL libraries) to create new datasources and create features
programmatically.  I could envision how I would do this, receiving a list
of vertices/points in sequential order from the user.  Then building a
polygon feature with these.  You could then open the county polygons file
too.

The only part I'm not sure of is GDAL/OGR's abilities to do geometric
comparisons between features.  I bet it's there somewhere but I haven't
touched it yet.

Also note that I work primarily in Python which has hooks into the c++
library.  Being an ArcInfo guy myself, I've found Python to be as intuitive
as AML and much more fun than VB :)

For what it's worth,
 Tyler




More information about the Gdal-dev mailing list