[GRASS-dev] [grass-code R][428] Warn about wrong epsg code
when creating a location in grass 6.2
Michael Barton
michael.barton at asu.edu
Mon Jun 25 14:16:03 EDT 2007
On 6/25/07 10:16 AM, "Maciej Sieczka" <tutey at o2.pl> wrote:
> Michael Barton wrote:
>> AFAICT, there is no way for the GUI to know if an EPSG code is bad. Perhaps
>> g.proj can test for this, but I wouldn't count on it.
>
> GDAL's epsg_tr.py can do it:
>
> $ epsg_tr.py 1333
>
> ERROR 6: EPSG PCS/GCS code 1333 not found in EPSG support files. Is
> this a valid
> EPSG coordinate system?
> Unable to lookup 1333 , either not a valid EPSG
> code, or it the EPSG csv files are not accessable.
>
The question then is how (or if) we can trap and display such an error. I'd
rather it fail gracefully (i.e., simply not create a location and keep
running) than to crash, but an informative message to the user is even
better.
>> The procedure to create a location from a georeferenced file is different
>> from the procedure to create it from an EPSG code,
>
> But doesn't it depend on extracting the EPSG code from a georeferenced
> file? So if the extracted code was invalid (ie. the file's georeference
> info was corrupted) it could react same as for an invalid EPSG code
> entered?
>
I guess I don't know. If so, I didn't realize this. This would explain the
email (and my confusion).
Michael
__________________________________________
Michael Barton, Professor of Anthropology and Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University
phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton
More information about the grass-dev
mailing list