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

Unknown output message from terralib #2330

Open
avancinirodrigo opened this issue Jan 29, 2020 · 2 comments
Open

Unknown output message from terralib #2330

avancinirodrigo opened this issue Jan 29, 2020 · 2 comments
Assignees
Labels
Milestone

Comments

@avancinirodrigo
Copy link
Contributor

TerraLib is outputting too many messages, mainly when handling tif.
It seems the messages come from Proj4 3rdparty:

proj_create_from_database: prime meridian not found
proj_uom_get_info_from_database: unit of measure not found
@avancinirodrigo avancinirodrigo added this to the 2.0.0 milestone Jan 29, 2020
@avancinirodrigo avancinirodrigo self-assigned this Jan 29, 2020
@avancinirodrigo
Copy link
Contributor Author

@avancinirodrigo
Copy link
Contributor Author

The error message raises when terralib is not identifying the projection.

The method on terralib that the error happens:
terralib/gdal/Utils.cpp

te::rst::Grid* te::gdal::GetGrid(GDALDataset* gds, const int multiResLevel)
...
   const char* projRef = gds->GetProjectionRef(); // <-- right here
...

Comming from:
terralib/gdal/Transactor.cpp

std::unique_ptr<te::da::DataSetType> te::gdal::Transactor::getType(const std::string& dsfullname)

An example of the return of GetProjectionRef() when the projection is not identified:

PROJCS["unnamed",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS
 1967",6378160,298.249988368249,AUTHORITY["EPSG","7036"]],AUTHORITY["EPSG","6618"]],PRIMEM
["Greenwich",0],UNIT["unknown",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER
["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996]
,PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],UNIT["metre",1,AUTHORITY
["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]]  

A valid one:

GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,
AUTHORITY["EPSG","7050"]],TOWGS84[-66.87,4.37,-38.52,0,0,0,0],
AUTHORITY["EPSG","6618"]],PRIMEM["Greenw
ich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],
AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4618"]]

A temporary solution is to reproject data.
Another solution is not to allow unrecognized projection.

avancinirodrigo added a commit to avancinirodrigo/terrame that referenced this issue Mar 31, 2020
avancinirodrigo added a commit to avancinirodrigo/terrame that referenced this issue Apr 1, 2020
avancinirodrigo added a commit to avancinirodrigo/terrame that referenced this issue Apr 3, 2020
@pedro-andrade-inpe pedro-andrade-inpe modified the milestones: 2.0.0, 2.1 Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants