brazil-data-cube / lccs.py Goto Github PK
View Code? Open in Web Editor NEWPython Client Library for Land Cover Classification System Web Service
License: GNU General Public License v3.0
Python Client Library for Land Cover Classification System Web Service
License: GNU General Public License v3.0
Tasks:
lccs/version.py
b-0.2
.branch b-0.2
, create a tag named: v-0.2.0
.master branch
increase version in lccs/version.py
to 0.4.0
Tasks:
lccs/version.py
b-0.4
.branch b-0.4
, create a tag named: v-0.4.0
.master branch
increase version in lccs/version.py
to 0.6.0
Move Jupyter Notebooks to Brazil Data Cube Jupyter Notebooks Gallery
There is a bug in lccs.py when a request is made to LCCS Server without property access_token
.
curl https://path/to/lccs/classification_systems?access_token=token_e
return self.svc.lccs_ws.get_system_classification()
File "/terra_collect/terra_collect/services/lccs_ws.py", line 51, in get_system_classification
systems = lccs_service.classification_systems
File "/usr/local/lib/python3.7/site-packages/lccs/lccs.py", line 90, in classification_systems
return self._get_classification_systems()
File "/usr/local/lib/python3.7/site-packages/lccs/lccs.py", line 61, in _get_classification_systems
data = Utils._get(url)
File "/usr/local/lib/python3.7/site-packages/lccs/utils.py", line 40, in _get
response.raise_for_status()
File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: NOT FOUND for url: http://dev-lccs-ws:5000/classification_systems&language=pt-br
The error occurs due wrong usage of URI and parameters in request session.
For example:
Line 35 in 2f9b2bc
and here
Line 60 in 2f9b2bc
You should use something like this
params = {"language": "pt-br"}
if self.access_token:
params["access_token"] = self.access_token
session.get(SERVICE_RESOURCE_URL, params=params)
DO NOT manually concat these parameters in URL
Tasks:
lccs/version.py
b-0.8
.branch b-0.8
, create a tag named: v-0.8.0
.master branch
increase version in lccs/version.py
to 1.0.0
Remove the 'access token' in request params.
The Python 3.7 was deprecated. Consider to upgrade this to 3.8 or even the 3.11
Tasks:
lccs/version.py
b-0.6
.branch b-0.6
, create a tag named: v-0.6.0
.master branch
increase version in lccs/version.py
to 0.8.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.