CSIRO-Precision-Agriculture / PAT_QGIS_Plugin

PAT is a QGIS plugin containing a collection of tools for processing precision agriculture data.
Other
25 stars 8 forks source link

Projection error in clean, trim and normalize step #48

Closed FranklinJS closed 3 years ago

FranklinJS commented 3 years ago

Testing the plugin in QGIS 3.10 I get this error:

Without auto detect UTM zone image

With auto detect UTM zone image

2020-09-09T09:43:42 INFO ** Processing Clean, trim and normalise point data 2020-09-09T09:43:42 INFO Parameters:--------------------------------------- Layer: 6070_QD02_SOCA_2020 Clip Layer: 6070_QD02_SOCA_2020_SIMP Process Field: CA Thinning Distance: 1.0m Remove Zeros: False Standard Devs to Use: 3.0 Trim Iteratively: True Output Projected Coordinate System: EPSG:32722 - WGS 84 / UTM zone 22S Saved CSV File: D:\SAZONAIS\TESTE_PAT\6070_QD02\6070_QD02_SO_2020_CA_normtrimmed.csv 2020-09-09T09:43:42 CRITICAL Invalid projection: UTM_Zone_22_Southern_Hemisphere: (Internal Proj Error: proj_create: unrecognized format / unknown name) Traceback (most recent call last): File "C:/Users/franklin.silva/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\pat\gui\cleanTrimPoints_wizard.py", line 998, in accept ptsDesc = describe.VectorDescribe(filePoints) File "C:\OSGEO4~1\apps\Python37\lib\site-packages\pyprecag\describe.py", line 57, in init self.describeFile() File "C:\OSGEO4~1\apps\Python37\lib\site-packages\pyprecag\describe.py", line 81, in describeFile self.crs.getFromWKT(fio_coll.crs_wkt) File "C:\OSGEO4~1\apps\Python37\lib\site-packages\pyprecag\crs.py", line 91, in getFromWKT pyproj_crs = pyproj.CRS(source.GetName()) File "C:\OSGEO4~1\apps\Python37\lib\site-packages\pyproj\crs\crs.py", line 296, in init super().init(projstring) File "pyproj_crs.pyx", line 2338, in pyproj._crs._CRS.init pyproj.exceptions.CRSError: Invalid projection: UTM_Zone_22_Southern_Hemisphere: (Internal Proj Error: proj_create: unrecognized format / unknown name)

cratcliff commented 3 years ago

@FranklinJS there is probably a problem with the input data coordinate system. Are you using shapefiles?

Make a copy of your data then try using the Define shapefile projection tool from the vector general group in the processing toolbox. Set the CRS to the appropriate coordinate system of the input data. This will NOT reproject your data only re-create/update the coordinate system parameters.

Let me know if this fixes your problem.