[Gdal-dev] convert a group of points (lat, lon) to a shape file

Xiaodong Zhang zhang at aero.und.edu
Thu Jun 23 11:12:26 EDT 2005


Thanks Perry,

Your memory is good. It is working. Much appreciate.

Xiaodong

Pericles S. Nacionales wrote:

> Greetings, Xiaodong!
>
> I'm sure there are more than one way to do it but in the past this is 
> what I've done (this is the ESRI generate file format):
>
> 101
> lon1,lat1
> lon2, lat2
> ...
> lonN,latN
> END
> 102
> lon1,lat1
> lon2, lat2
> ...
> lonN,latN
> END
> END
>
> save it as a file and you can then find the gen2shp utility somewhere 
> (or the gen2shp extension for ArcView3) and convert it to a shapefile. 
> Or you can use Arc/Info "generate" to create a coverage.  The example 
> above will give you two polygons with IDs 101 and 102.  I haven't done 
> this in years so my memory might be a little hazy.
>
> If ogr2ogr supports it, that would be even better!
>
> I hope that helps.
>
> -Perry
>
> Xiaodong Zhang wrote:
>
>> Hi,
>>
>> I have a humble question which may have been answered before, but 
>> could anybody please kindly help out. The question is:
>>
>> If I have a series of points, say in a text file, like
>> lat1, lon1
>> lat2, lon2
>> lat3, lon3
>> lat4, lon4
>>
>> How should I format the text file such that an ogr utility (e.g., 
>> ogr2ogr) can convert it into a shapefile as a polygon.
>>
>> Many thanks
>> Xiaodong
>>
>> _______________________________________________
>> Gdal-dev mailing list
>> Gdal-dev at xserve.flids.com
>> http://xserve.flids.com/mailman/listinfo/gdal-dev
>>
>>




More information about the Gdal-dev mailing list