Re: File format question

Hamish <[email protected]> Thu, 23 Mar 2006 12:00:47 +1200
Newsgroups gmane.games.flightgear.terragear.devel
Message-ID <[email protected]>
> >It means that you need to project them to WGS84 (World Geodetic
> >System  of 1984), which is the datum used by TerraGear and
> >FlightGear. This  could be done using a small perl script and proj4.
> >
> I played around with proj4 a bit, and I'm hoping I did this correct.
> I picked a random coordinate from the data I made, and passed it thro'
> cs2cs:
> 
> random data:
> 502429.000000, 127637.000000, 75
> 
> converted the long and lat to degrees by /3600:
> 139.56361111111113 35.454722222222223
> 
> piped them thro cs2cs:
> $ echo "139.56361111111113 35.454722222222223"|cs2cs +proj=longlat
> +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs
> 139d33'49"E 35d27'17"N 0.000
> 
> Converted them back to degrees:
> (49/60 + 33)/60 + 139
> = 139.5636111111111
> and
> (17/60 + 27)/60 + 35
> = 35.454722222222223
> 
> And I seem to get the same numbers as the original data (well, close
> enough). Does this mean that my data is already in WGS84? Or did I do
> something wrong with the cs2cs parameters?

the difference between the GRS80 and WGS84 ellipsiods are pretty minor I
think. Just a difference in the flattening parameter (??), so maybe 10cm
diff in the vertical, nothing in the horizontal. ie way beyond the
resolution of the source data, so don't worry about it.

also to get cs2cs to output in decimal form use: 
cs2cs -f'%.8f'


> >From here, I guess I need to somehow convert the data to a USGS DEM
> format so the TerraGear tools can do it's magic. Tho, I haven't
> figured out an easy way to do that yet...

If you do, please post it!


Hamish

_______________________________________________
Terragear-devel mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/terragear-devel
2f585eeea02e2c79d7b1d8c4963bae2d