Sabtu, 16 Maret 2019

ArcGIS Geometry Distance - AttributeError: 'NoneType' object has no attribute '_tools'

I'm writing a function that takes in two features and calculates the distance between them. I'm using the geometry.distance module.

Here's my code:


from arcgis.gis import *
from arcgis.geocoding import geocode
from arcgis import geometry

geometry1 = {'x': -71.13783063274357, 'y': 42.360989045712415}
geometry2 = {'x': -71.12533031723845, 'y': 42.35240870031874}
spation_ref = {"wkid" : 4326}


def calculate_distance(geometry1, geometry2):
return geometry.distance(spation_ref, geometry1, geometry2,\
distance_unit='', geodesic=False, gis=None)

calculate_distance(geometry1, geometry2)

This is according to the API geometry.distance(spatial_ref, geometry1, geometry2, distance_unit='', geodesic=False, gis=None), but I get errors when trying to use it.


AttributeError: 'NoneType' object has no attribute '_tools'

How do I use API?

Here's the source code for the API: ESRI API



from ArcGIS Geometry Distance - AttributeError: 'NoneType' object has no attribute '_tools'

ArcGIS Geometry Distance - AttributeError: 'NoneType' object has no attribute '_tools' Rating: 4.5 Diposkan Oleh: Admin

0 komentar:

Posting Komentar

Popular Posts