Proceed to GeoCommunity Home Page


SpatialNewsGIS Data DepotGeoImaging ChannelGIS and MappingSoftwareGIS JobsGeoBids-RFPsGeoCommunity MarketplaceGIS Event Listings
HomeLoginAccountsAboutContactAdvertiseSearchFAQsForumsCartFree Newsletter

Sponsored by:


TOPICS
Today's News

Submit News

Feature Articles

Product Reviews

Education

News Affiliates

Discussions

Newsletters

Email Lists

Polls

Editor's Corner


SpatialNews Daily Newswire!
Subscribe now!

Latest Industry Headlines
SiteVision GIS Partnership With City of Roanoke VA Goes Live
Garmin® Introduces Delta™ Upland Remote Trainer with Beeper
Caliper Offers Updated Chile Data for Use with Maptitude 2013
Southampton’s Go! Rhinos Trail Mapped by Ordnance Survey
New Approach to Measuring Coral Growth Offers Valuable Tool for Reef Managers
Topo ly - Tailor-Fit for Companies' Online Mapping Needs

Latest GeoBids-RFPs
Nautical Charts*Poland
Software & Telemetry GPS
Spatial Data Management-DC
Geospatial and Mapping-DC
Next-Gen 911-MO

Recent Job Opportunities
Planner/GIS Specialist
Team Leader- Grape Supply Systems
Geospatial Developer

Recent Discussions
Raster images
cartographic symbology
Telephone Exchange areas in Europe
Problem showcasing Vector map on Windows CE device
Base map

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!

Copyright© 1995-2012 MindSites Group / Privacy Policy

GeoCommunity™, Wireless Developer Network™, GIS Data Depot®, and Spatial News™
including all logos and other service marks
are registered trademarks and trade communities of
MindSites Group