question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Interface to (geo-)spacial analysis libraries

See original GitHub issue

Dear all,

as far as I understand, the heavy (geo-)spacial computations are normally done in Python using Shapely, PySAL etc. and are not generally the aim of this library.

Given we’d like to perform such computations on SVG shapes (e.g. set operations, distances), is there any recommended way to export or interface Path primitives for external applications?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
mikedhcommented, Oct 11, 2018

Hey, trimesh might be useful for this sort of thing, it’s using svg.path internally:

In [1]: import trimesh

In [2]: path = trimesh.load('wrench.svg')

In [3]: path
Out[3]: <trimesh.path.path.Path2D at 0x7f1d08c8dc50>

In [4]: path.polygons_full
Out[4]: 
array([<shapely.geometry.polygon.Polygon object at 0x7f1d08c53be0>],
      dtype=object)

0reactions
regebrocommented, Oct 12, 2018

It seems to me that using svg.path for parsing and then converting the SVG shapes to something that can be fed to Shapely should be quite easy.

Read more comments on GitHub >

github_iconTop Results From Across the Web

15 Python Libraries for GIS and Mapping - GISGeography
1. Arcpy ... If you use Esri ArcGIS, then you're probably familiar with the ArcPy library. ArcPy is meant for geoprocessing operations. But...
Read more >
Best Libraries for Geospatial Data Visualisation in Python
1. PyViz/HoloViz(Geoviews, Datashader, HvPlot) ... Holoviz maintained libraries have all data visualisations you might need, including dashboards ...
Read more >
Here's top 7 libraries for geospatial analysis - Packt Hub
Top 7 libraries for geospatial analysis · GDAL/OGR · GEOS · Shapely · Fiona · Python Shapefile Library (pyshp) · pyproj · Rasterio...
Read more >
GIS, Cartographic and Spatial Analysis Tools: Python
This guide provides an overview of geographic software, libraries and tools supported by or recommended by RDS staff. ... Python is an open-source ......
Read more >
Libraries - OSGeo
Geospatial libraries offer developers access to a wide range of spatial data, web services, analysis and processing. These libraries are often available as ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found