[FWTools] As uninformed as they get

Frank Warmerdam warmerdam at pobox.com
Sat Dec 30 00:52:14 EST 2006


Greg Nuspel wrote:
> I am having difficulties combining vector information from different
> sources. I think the main issue is projection, but I could be so wrong that
> you'll all be laughing.
> 
> The first file is a road file and the only info I can find that I think is
> related to  projection is:
> 
> Spatial Reference Information: 
> Horizontal Coordinate System Definition: 
> Geographic: 
> Latitude Resolution: 0.0000001 
> Longitude Resolution: 0.0000001 
> Geographic Coordinate Units: Decimal degrees 
> Geodetic Model: 
> Horizontal Datum Name: NAD83CSRS (North American Datum 1983 in Canadian
> Spatial Reference System) 
> Ellipsoid Name: GRS80 (Global Reference System 1980) 
> Semi-major Axis: 6378137 
> Denominator of Flattening Ratio: 298.257222101
> 
> 
> The second file has this info:
> Spatial_Reference_Information: 
> Horizontal_Coordinate_System_Definition: 
> Planar: 
> Map_Projection: 
> Map_Projection_Name: Lambert Conformal Conic 
> Lambert_Conformal_Conic: 
> Standard_Parallel: 49.000000 
> Standard_Parallel: 77.000000 
> Longitude_of_Central_Meridian: -105.000000 
> Latitude_of_Projection_Origin: 49.000000 
> False_Easting: 0.000000 
> False_Northing: 0.000000 
> Planar_Coordinate_Information: 
> Planar_Coordinate_Encoding_Method: coordinate pair 
> Coordinate_Representation: 
> Abscissa_Resolution: 0.016384 
> Ordinate_Resolution: 0.016384 
> Planar_Distance_Units: meters 
> Geodetic_Model: 
> Horizontal_Datum_Name: D_Clarke_1866 
> Ellipsoid_Name: Clarke 1866 
> Semi-major_Axis: 6378206.400000 
> Denominator_of_Flattening_Ratio: 294.978698
> 
> I am sure you have a method of changing the projection of one to match the
> other, after that I do know how to extract the area I want using OGR2OGR.
> Failing that I am looking for a source of data for the Invermere Valley of
> British Columbia. I am trying to build up scenery for a soaring flight
> simulator (Condor) and I want to avoid using photographic overlays to create
> the roads, railways, rivers and lakes on a landscape rendered in Terragen.
> So any directions or suggested tutorials would be appreciated.

Greg,

Assuming the Lambert Conformal Conic file (your second) is a shapefile,
an ogr2ogr command like the following should approximately convert the
file to NAD83 geographic coordinates to match the first.  BTW your second
file is not very specific about the datum, so I am assuming NAD27 - the
most likely real datum on the Clarke 1866 datum in Canada.

ogr2ogr -t_srs WGS84 \
     -s_srs '+proj=lcc +lat_1=49 +lat_2=77 +lon_0=-105 +lat_0=49 +datum=NAD27' \
     out.shp in.shp

OpenEV itself completely ignores coordinate system information on vector
data, and it doesn't know how to reproject vector data.  So if you want
to overlay vector data in different coordinate systems you need
to reproject in advance with a utility like ogr2ogr to put everything in
a common coordinate system.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the FWTools mailing list