RandomPointsFromCategorizedRasterLayer: Output vector layer has no CRS info
Issue #1385
resolved
I would suggest to use the same CRS as the raster layer
C:\OSGeo4W>ogrinfo C:\Users\fabian\AppData\Local\Temp\processing_SCknCG\024a00588dde4d3e8c43e13abf6a2091\outputPoints.gpkg outputPoints
INFO: Open of `C:\Users\fabian\AppData\Local\Temp\processing_SCknCG\024a00588dde4d3e8c43e13abf6a2091\outputPoints.gpkg'
using driver `GPKG' successful.
Layer name: outputPoints
Geometry: Point
Feature Count: 150
Extent: (4016071.363042, 3105054.607965) - (4045981.363042, 3134664.607965)
Layer SRS WKT:
GEOGCRS["Undefined geographic SRS",
DATUM["unknown",
ELLIPSOID["unknown",6378137,298.257223563,
LENGTHUNIT["metre",1,
ID["EPSG",9001]]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433,
ID["EPSG",9122]]],
CS[ellipsoidal,2],
AXIS["latitude",north,
ORDER[1],
ANGLEUNIT["degree",0.0174532925199433,
ID["EPSG",9122]]],
AXIS["longitude",east,
ORDER[2],
ANGLEUNIT["degree",0.0174532925199433,
ID["EPSG",9122]]]]
Data axis to CRS axis mapping: 2,1
FID Column = fid
Geometry Column = geom
CATEGORY: Real (0.0)
OGRFeature(outputPoints):1
CATEGORY (Real) = 5
POINT (4021921.36304165 3134664.6079648)
OGRFeature(outputPoints):2
CATEGORY (Real) = 2
POINT (4023001.36304165 3134604.6079648)
[...]
In the example above raster layer CRS was EPSG:3035
Comments (5)
-
-
Issue title says: “Output vector layer has no CRS info”
I can’t reproduce this with the testdata. result looks fine:
-
Please share your dataset.
-
reporter - changed status to resolved
I close this now. Can not reproduce this with recent version and I only have similar data but not the exact dataset when issue came up. Maybe it was a problem with "connecting" the rasters WKT representation of EPSG:3035 with the same CRS in the database. As the ogrinfo call shows, there is a WKT CRS info, but QGIS could not see it as 3035 in that case.
-
- Log in to comment
Hmm, I actually use the CRS from the input raster. I would guess that GDAL alters it along the way.