Total road distance for Udaipur

14 views
Skip to first unread message

Jim Mackenzie

unread,
Aug 21, 2023, 5:33:55 PMAug 21
to datameet
Hi all,

I'm using QGIS to try and generate the total road distance for Udaipur. My coordinates are below:

import osmpy
from shapely import wkt

boundary = wkt.loads('POLYGON((73.6451,24.664,73.6942,24.6690,73.7376,24.6510,73.7745,24.5986,73.7899,24.5183,73.6498,24.5149))')
osmpy.get('POIs', boundary))

For some reason the above is giving me an error in QGIS though. Can anyone help out?

Cheers,

Jim.

This is the error for anyone who's interested:

Traceback (most recent call last):
  File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\code.py", line 90, in runcode
    exec(code, self.locals)
  File "<input>", line 1, in <module>
  File "<string>", line 1, in <module>
  File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python\qgis\utils.py", line 672, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\Users\User 1\AppData\Roaming\Python\Python37\site-packages\osmpy\__init__.py", line 2, in <module>
    from osmpy.core import get, list_queries
  File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python\qgis\utils.py", line 672, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\Users\User 1\AppData\Roaming\Python\Python37\site-packages\osmpy\core.py", line 3, in <module>
    from shapely.geometry import box, Polygon, MultiPolygon, GeometryCollection, shape
  File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python\qgis\utils.py", line 672, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\shapely\geometry\__init__.py", line 4, in <module>
    from .base import CAP_STYLE, JOIN_STYLE
  File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python\qgis\utils.py", line 672, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\shapely\geometry\base.py", line 18, in <module>
    from shapely.coords import CoordinateSequence
  File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python\qgis\utils.py", line 672, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\shapely\coords.py", line 8, in <module>
    from shapely.geos import lgeos
  File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python\qgis\utils.py", line 672, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\shapely\geos.py", line 160, in <module>
    _lgeos = load_dll("geos_c.dll")
  File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\shapely\geos.py", line 62, in load_dll
    libname, fallbacks or []))
OSError: Could not find lib geos_c.dll or load any of its variants [].
Reply all
Reply to author
Forward
0 new messages