[GRASS-dev] r.unpack: unhelpful error message when projection info does not match
Anna Petrášová
kratochanna at gmail.com
Wed Oct 9 19:48:25 PDT 2013
Hi,
please test r57969. You should see a diff if the proj_info files don't
match.
Anna
On Wed, Oct 9, 2013 at 6:08 PM, Markus Neteler <neteler at osgeo.org> wrote:
> Hi,
>
> the error (example UTM map import into LAEA location):
>
> r.unpack landcover_1m.pack
> ERROR: Projection information does not match. Aborting.
>
> is rather unhelpful. The code is:
>
> # check projection compatibility in a rather crappy way
> if not grass.compare_key_value_text_files('PROJ_INFO',
> os.path.join(mset_dir, '..', 'PERMANENT', 'PROJ_INFO')) or \
> not grass.compare_key_value_text_files('PROJ_UNITS',
> os.path.join(mset_dir, '..', 'PERMANENT', 'PROJ_UNITS')):
> if flags['o']:
> grass.warning(_("Projection information does not match.
> Proceeding..."))
> else:
> grass.fatal(_("Projection information does not match.
> Aborting."))
>
> I would suggest to print a "diff -u file1 file2" rather than nothing
> as now (perhaps Python offers a nice way to show the wrong keys to the
> user).
> Or are there other options?
>
> Markus
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20131009/d9703988/attachment-0001.html>
More information about the grass-dev
mailing list