[Gdal-dev] Angular or linear coordinates for a shapefile
Dan Homerick
danhomerick at gmail.com
Tue Sep 25 22:38:25 EDT 2007
Hello List,
This probably something of a naive question -- please don't hesitate to
point out what "should be obvious."
I'm creating polygon-filled shapefiles using data extracted from a geotif.
To do this, I'm using the OGRLinearRing::SetPoints() method and then adding
the ring(s) to a polygon.
My question is, what coordinate system should I be setting the points with?
I want the resulting shapefile to still be georeferenced. The way I see it,
I have 3 options, one of which is clearly wrong:
1. Pixel/Line coordinates from the image. (wrong)
2. Linear geo coords, resulting from GDALApplyGeoTransform.
3. Angular geo coords, resulting from something like:
/**********************************************************/
OGRSpatialReference* m_TargetSRS = m_SourceSRS.CloneGeogCS();
m_LinearCoordToAngCoord = OGRCreateCoordinateTransformation(
&m_SourceSRS,
m_TargetSRS );
m_LinearCoordToAngCoord->Transform(...)
/**********************************************************/
where m_SourceSRS is set from the GeoTiff.
Will my shapefiles be properly georeferenced if I use the second method (and
a .prj file is used)?
Will the be properly georeferenced if I use the third (without a .prj file)?
Also, what's the correct names for the "linear geo coords" and "angular geo
coords"?
Thanks!
- Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070925/d74436e8/attachment.html
More information about the Gdal-dev
mailing list