Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid CRS when the newly created shapefile has a different CRS than the project #14828

Closed
qgib opened this issue Feb 20, 2012 · 5 comments
Closed
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption

Comments

@qgib
Copy link
Contributor

qgib commented Feb 20, 2012

Author Name: Jan Jensen (@LtGlahn)
Original Redmine Issue: 5058
Affected QGIS version: master


Running v1.7.3 'Wroclaw' on 64 bits windows 7 machine.

Using one CRS for my project (WSG-84 UTM 33N EPSG:32633) I figured it would be nice to create a shapefile with polygons in plain WSG84-lat/lon (EPSG:4326). No special reason for it, just a whim. However, the projection of new shapefile projection was a total screwup.

Here's what I find with ogrinfo -summary

Layer name: test1_originalSRS
Geometry: Polygon
Feature Count: 3
Extent: (516090.757943, 7524045.000971) - (716205.736382, 7703464.547432)
Layer SRS WKT:
GEOGCS["GCS_WGS_1984",
    DATUM["WGS_1984",
        SPHEROID["WGS_1984",6378137,298.257223563]],
    PRIMEM["Greenwich",0],
    UNIT["Degree",0.017453292519943295]]

As you can see, the Extent is in what looks like UTM coordinates (and assuming zone 33N they are where I expect them to be). Those coordinates don't mix very well with WGS-84 projection parameters... Using UTM (meters) where you expect degrees will clearly produce bogus.

For your amusement I've uploaded a screenshot of what it looks like when you import the new shapefile into Qgis. That's EPSG:4326 like you've never seen it before!

Additional information: code rev. 00624b3, GDAL/OGR v 1.8.1, postgreSQL client v. 8.3.10, spatiaLite v 2.4.0, QWT v 5.2.1.


@qgib
Copy link
Contributor Author

qgib commented Feb 20, 2012

Author Name: Giovanni Manghi (@gioman)


as for the previous ticket you filed, please try qgis-dev with osgeo4w, I think also this was already fixed. Thanks.


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Feb 20, 2012

Author Name: Jan Jensen (@LtGlahn)


Installed qgis v1.7.4, and I get exactly the same error as before.

@qgib
Copy link
Contributor Author

qgib commented Feb 20, 2012

Author Name: Giovanni Manghi (@gioman)


Jan Jensen wrote:

Installed qgis v1.7.4, and I get exactly the same error as before.

can you test qgis-dev/osgeo4w? it may have been fixed but not backported.

@qgib
Copy link
Contributor Author

qgib commented Feb 21, 2012

Author Name: Giovanni Manghi (@gioman)


Just tested to create a new polygon shapefile in WGS84 in a EPSG 32633 project, and the result seems fine in qgis-master

GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

General:
Storage type of this layer: ESRI Shapefile
Source for this layer: C:/Users/gio/Desktop/teste.shp
Geometry type of the features in this layer: Polygon
The number of features in this layer: 1
Editing capabilities of this layer: Add Features, Delete Features, Change Attribute Values, Add Attributes, Create Spatial Index, Fast Access to Features at ID, Change Geometries
Extents:
In layer spatial reference system units : xMin,yMin -1.21177,-0.0946221 : xMax,yMax -0.228924,0.683721
Layer Spatial Reference System:
+proj=longlat +datum=WGS84 +no_defs

Can you please test qgis-master and see if it works fine for you? Thanks

@qgib
Copy link
Contributor Author

qgib commented Apr 18, 2012

Author Name: Giovanni Manghi (@gioman)


Closing for lack of feedback. Reopen if necessary.


  • resolution was changed from to worksforme
  • status_id was changed from Feedback to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption labels May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption
Projects
None yet
Development

No branches or pull requests

1 participant