We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
According to the areas_and_lengths documentation:
areas_and_lengths
If area_unit is not specified, then the units are meters.
Meters is not a valid areal unit. This appears to not just be a documentation issue but an actual code issue:
>>> from arcgis import gis, geometry >>> >>> gis = gis.GIS() >>> >>> geom_json = { ... "rings": [[[0, 0], [0, 10], [10, 10],[10, 0],[0, 0]]], ... "SpatialReference": {"wkid": 3857} ... } >>> >>> geom = geometry.Geometry(geom_json) >>> geometry.areas_and_lengths(geom, "", "", "", 3857) Error computing areas and lengths Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispython\lib\site-packages\arcgis\geometry\functions.py", line 85, in areas_and_lengths spatial_ref) File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispython\lib\site-packages\arcgis\_impl\tools.py", line 4596, in areas_and_lengths return self._con.post(path=url, postdata=params, token=self._token) File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispython\lib\site-packages\arcgis\_impl\connection.py", line 956, in post self._handle_json_error(resp_json['error'], errorcode) File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispython\lib\site-packages\arcgis\_impl\connection.py", line 976, in _handle_json_error raise RuntimeError(errormessage) RuntimeError: Error computing areas and lengths (Error Code: 500) >>> >>> # override default "meters" with "square meters" >>> geometry.areas_and_lengths(geom,"", "esriSquareMeters", "", 3857) {'areas': [100], 'lengths': [40]} >>>
The text was updated successfully, but these errors were encountered:
@bixb0012 for areas_and_lengths all the values are required, and if not given properly they are expected to fail.
Sorry, something went wrong.
No branches or pull requests
According to the
areas_and_lengths
documentation:Meters is not a valid areal unit. This appears to not just be a documentation issue but an actual code issue:
The text was updated successfully, but these errors were encountered: