[GRASS5] Even More on Projections
Frank Warmerdam
warmerda at home.com
Thu Sep 21 16:32:59 EDT 2000
Folks,
Getting sick of me yet?
Amoung other things, I am trying to write an r.in.gdal command that will
allow import of GDAL supported raster formats into GRASS. GDAL sometimes
has a strong concept of the coordinate system of a raster (and sometimes
does not). How should I implement such a command to make it easy for
a user to import a raster?
Currently I prepare a struct Cell_head, attempting to set the projection
to match that of the source file if possible. I then call G_set_window()
with that structure, and then G_open_raster_new(), and write the file.
This seems to result in a cellhd file being created with the information
I passed to G_set_window() whether the projection matches the location or
not. Am I responsible for doing validation to ensure the projection of
my new raster matches the location? Some commands (like r.in.dted) seem
to check, while others (like r.in.doq) seem to do the same as r.in.gdal.
If the coordinate system doesn't match the existing location I would like
it easy for the user to create a new location with a coordinate system
matching the source file. Is this something that raster import programs
ever do? Can you point me to an example that does this?
Finally, as a user how do I change my current location? Do I need to exit
out of grass and restart it specifying a new location?
Best regards,
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerda at home.com
light and sound - activate the windows | http://members.home.com/warmerda
and watch the world go round - Rush | Geospatial Programmer for Rent
----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'
More information about the grass-dev
mailing list