|
|
| GeoCommunity Mailing List |
| |
| Mailing List Archives |
| Subject: | Re: [gislist] Need advice regarding ways to programmatically create
polygons |
| Date: |
11/08/2005 04:10:02 PM |
| From: |
Dylan Keon |
|
|
On 11/08/2005 12:21 PM, Guillaume Drolet wrote: > Hi, > > I need to programatically create polygons (e.g. ellipse) based on input > parameters from a text file. > I need your help regarding programming languages to use, softwares, etc. > > I know Perl, IDL, C (it's been a while though), and a bit of VBA (just > used it for macros in Excel). I mostly program with ENVI/IDL but > apparently it can't do what I need programmatically. I also use ESRI > ArcGIS but I've never programmed with it, although I'd be willing to > learn if learning Mapobjects isn't too long. I can work in Windows or > Linux environments so suggestions can be for any of these OSs. > > Once I'll have my polygons, they will serve as Regions of Interests to > extract image pixels using Starspan (freeware). Starspan accept any > vector data recognized by the OGR Library > (http://www.gdal.org/ogr/ogr_formats.html) so the polygons don't need to > be shapefiles.
Gui,
There are a number of ways to accomplish this. I would probably use one of the tools that has hooks into shapelib (http://shapelib.maptools.org/) to create shapefiles. See the bottom of that page for Perl and Python bindings, etc.
Or you can use the OGR API directly to accomplish the same thing: http://ogr.maptools.org/ogr_apitut.html
If you're using PostgreSQL/PostGIS you could parse your text file directly into SQL statements to create spatial features in the database.
If you happen to have MapServer installed you can script the creation of a shapefile pretty easily via any of the MapScript flavors. I have a short PHP script that parses a text file to create a line shapefile. I can send it to you if you want it.
--Dylan
_______________________________________________ gislist mailing list gislist@lists.geocomm.com http://lists.geocomm.com/mailman/listinfo/gislist
_________________________________ This list is brought to you by The GeoCommunity http://www.geocomm.com/
|
|

Sponsored by:

For information regarding advertising rates Click Here!
|