Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#3017 closed bug (worksforme)

Save as shapefile in AGD84 CRS

Reported by: micha Owned by: jef
Priority: major: does not work as expected Milestone: Version 1.6.0
Component: Vectors Version: 1.5.0
Keywords: CRS shapefile Cc:
Must Fix for Release: No Platform: Debian
Platform Version: Lenny Awaiting user input: no

Description

A text file of locations in the AGD84 zone 51 CRS (S. Hemisphere, EPSG 20351) was imported with the delimited text plugin. The this layer was saved as a shapefile, choosing the AGD84 CRS. This resulted in a "Latitude or Longitude exceeds limits" error. The global CRS was EPSG:4326. Changing the global CRS to EPSG:20351 does solve the problem and allows saving as a shapefile with the correct CRS. But I think this shouldn't occur in any global CRS. (checked both on Linux and Windows)

Attachments (2)

CRS_error.png (15.5 KB ) - added by micha 14 years ago.
screen shot of error
Brett Adams.csv (10.6 KB ) - added by micha 14 years ago.
sample data

Download all attachments as: .zip

Change History (6)

by micha, 14 years ago

Attachment: CRS_error.png added

screen shot of error

by micha, 14 years ago

Attachment: Brett Adams.csv added

sample data

in reply to:  description ; comment:1 by jef, 14 years ago

Resolution: worksforme
Status: newclosed

Replying to micha:

A text file of locations in the AGD84 zone 51 CRS (S. Hemisphere, EPSG 20351) was imported with the delimited text plugin. The this layer was saved as a shapefile, choosing the AGD84 CRS. This resulted in a "Latitude or Longitude exceeds limits" error. The global CRS was EPSG:4326. Changing the global CRS to EPSG:20351 does solve the problem and allows saving as a shapefile with the correct CRS. But I think this shouldn't occur in any global CRS. (checked both on Linux and Windows)

I can only reproduce the problem, when I don't actually specify the right CRS for the delimited text layer (ie. keep it WGS84). "Saving as" in AGD84 then means reprojecting from WGS84 to AGD84 and that leads to the PROJ exception as the coordinates are illegal for WGS84.

When setting the coordinate system of the delimited text layer to AGD84, saving as AGD84 works fine.

I don't think this is a bug.

in reply to:  1 ; comment:2 by micha, 14 years ago

Replying to jef:

Replying to micha:

A text file of locations in the AGD84 zone 51 CRS (S. Hemisphere, EPSG 20351) was imported with the delimited text plugin. The this layer was saved as a shapefile, choosing the AGD84 CRS. This resulted in a "Latitude or Longitude exceeds limits" error. The global CRS was EPSG:4326. Changing the global CRS to EPSG:20351 does solve the problem and allows saving as a shapefile with the correct CRS. But I think this shouldn't occur in any global CRS. (checked both on Linux and Windows)

I can only reproduce the problem, when I don't actually specify the right CRS for the delimited text layer (ie. keep it WGS84). "Saving as" in AGD84 then means reprojecting from WGS84 to AGD84 and that leads to the PROJ exception as the coordinates are illegal for WGS84.

When setting the coordinate system of the delimited text layer to AGD84, saving as AGD84 works fine.

I don't think this is a bug.

The problem, I think, is the default global CRS. If the user just leaves the default, then loads a csv file, QGIS *assumes* it is in WGS84, and there's no place to indicate otherwise. Then when he wants to export to shape with the correct CRS, it fails. Apparently this behavior of the default global CRS is not so obvious to users. Thanks, Micha

in reply to:  2 ; comment:3 by jef, 14 years ago

Replying to micha:

The problem, I think, is the default global CRS. If the user just leaves the default, then loads a csv file, QGIS *assumes* it is in WGS84, and there's no place to indicate otherwise.

Except in vector layer properties. There the CRS can be checked and changed.

in reply to:  3 comment:4 by micha, 14 years ago

Replying to jef:

Replying to micha:

The problem, I think, is the default global CRS. If the user just leaves the default, then loads a csv file, QGIS *assumes* it is in WGS84, and there's no place to indicate otherwise.

Except in vector layer properties. There the CRS can be checked and changed.

Oh right! Thanks for reminding me...

Note: See TracTickets for help on using tickets.