[gdal-dev] Creating a Shape File(s)

Tamas Szekeres szekerest at gmail.com
Mon Jun 16 16:05:40 EDT 2008


Hi,

You might want to use something like:

<GeometryField encoding="WKT" field="mywktfield"/>

And specify the geometry in WKT format in the source dataset.
http://dev.mysql.com/doc/refman/5.0/en/gis-wkt-format.html

Best regards,

Tamas



2008/6/16 Courtney Schitka <c.schitka at gmail.com>:
> Hi All,
>
> Today I have an interesting problem. I know the 4 corners of a bounding box
> for a geographical area. I wish to create a shape file knowing only these 4
> co-ordinates. I was thinking that the best way to do something like this,
> would be to put them into a CSV file, following the directions specified
> here: http://www.gdal.org/ogr/drv_csv.html .Then taking that CSV  file and
> relying on the  VRT driver to read it and using ogr2ogr to create a shape
> file from my CSV file. What I am curious about. Is this: When I create the
> associated VRT file to accompany my CSV so the vrt driver can read it.
> Obviously the GeometryType is wkbPolygon and the LayerSRS is assumed to be
> WGS84.
>
>
> But what does the GeometryField encoding look like ? The example from the
> url above only specifies pts. And I couldn't find one for polygons. Could
> someone please shed some light on this. OR if you have a different/better
> way to approach this without the aid of an ESRI product.
>
>   <GeometryType>wkbPoint</GeometryType>
>       <LayerSRS>WGS84</LayerSRS>
>    <GeometryField encoding="PointFromColumns" x="Longitude" y="Latitude"/>
>
> Thanks for your help.
>
> Courtney
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>


More information about the gdal-dev mailing list