Skip to content

Instantly share code, notes, and snippets.

@sweenzor
Last active January 19, 2022 14:45
Show Gist options
  • Save sweenzor/8275135 to your computer and use it in GitHub Desktop.
Save sweenzor/8275135 to your computer and use it in GitHub Desktop.
Shapely ipython notebook example
Display the source blob
Display the rendered blob
Raw
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "code",
"collapsed": false,
"input": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"from shapely.geometry import Point, Polygon, LineString\n",
"import descartes"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 2
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"circle = Point(5.0, 0.0).buffer(10.0)\n",
"clip_poly = Polygon([[-9.5, -2], [2, 2], [3, 4], [-1, 3]])\n",
"clipped_shape = circle.difference(clip_poly)\n",
"\n",
"line = LineString([[-10, -5], [15, 5]])\n",
"line2 = LineString([[-10, -5], [-5, 0], [2, 3]])"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 3
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"print 'Blue line intersects clipped shape:', line.intersects(clipped_shape)\n",
"print 'Green line intersects clipped shape:', line2.intersects(clipped_shape)\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.add_subplot(111)\n",
"\n",
"ax.plot(*np.array(line).T, color='blue', linewidth=3, solid_capstyle='round')\n",
"ax.plot(*np.array(line2).T, color='green', linewidth=3, solid_capstyle='round')\n",
"ax.add_patch(descartes.PolygonPatch(clipped_shape, fc='blue', alpha=0.5))\n",
"ax.axis('equal')\n",
"\n",
"plt.show()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Blue line intersects clipped shape: True\n",
"Green line intersects clipped shape: False\n"
]
},
{
"metadata": {},
"output_type": "display_data",
"png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAEACAYAAACj0I2EAAAABHNCSVQICAgIfAhkiAAAA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n8jrqTyWTIzMxEamoq3nvvPd7liKKmpgYajQYAoNFoUFNTw7ki4TnK604S\ngZ6VlYXExMReH7t37x7U/TjDahxbj/Wbb77Bb37zG9y4cQMFBQUIDw/Hyy+/zLvcYXGG38dwHT16\nFGfPnsV3332HTZs24fDhw7xLEpVMJpPc79WRXneSOJXcDz/8MOifiYyMRHl5edfnFRUViIyMFLIs\nUQz0sT799NOD2s3riO7+HZWXl/f4q0oKwsPDAQAhISFYvHgx8vPzMW3aNM5VCUuj0UCn0yEsLAzV\n1dUIDQ3lXZKguj8e3q87SXToA8Xu2gD1+eefw2w248aNGzY3QDmT6urqrn/v2LGjxzvxzig1NRVX\nrlxBaWkpzGYztm3bhuzsbN5lCaatrQ0tLS0Abl+AY9++fU7/O+tLdnY2Nm/eDADYvHkzFi1axLki\nYTnU647ve7Li+/rrr1lUVBRTqVRMo9GwuXPndn3ttddeY6NGjWJjx45lOTk5HKsUxqpVq1hiYiJL\nSkpijzzyCNPpdLxLGra9e/eyuLg4NmrUKPb666/zLkdQ169fZ8nJySw5OZmNHz9eEo9v2bJlLDw8\nnLm7u7OoqCj24YcfMr1ez2bNmsXGjBnDsrKyWENDA+8yh+zux/fBBx841OuONhYRQohEuNTIhRBC\npIwCnRBCJIICnRBCJIICnRBCJIICnRBCJIICnRBCJIICnRBCJIICnRBCJOL/AxtNh0zxjKI6AAAA\nAElFTkSuQmCC\n",
"text": [
"<matplotlib.figure.Figure at 0x446d510>"
]
}
],
"prompt_number": 4
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"start = Polygon([[-2, 1], [2, 2], [3, 4], [-1, 3]])\n",
"end = Polygon([[-6, -2], [-6, -4], [-3, -4], [-1, -3]])\n",
"line = LineString([[-8, -5], [5, 5]])\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.add_subplot(111)\n",
"\n",
"ax.plot(*np.array(line).T, color='red', linewidth=1, solid_capstyle='round')\n",
"ax.add_patch(descartes.PolygonPatch(start, fc='blue', alpha=0.5))\n",
"ax.add_patch(descartes.PolygonPatch(end, fc='green', alpha=0.5))\n",
"ax.axis('equal')\n",
"\n",
"plt.show()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"metadata": {},
"output_type": "display_data",
"png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAEACAYAAACqOy3+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHLxJREFUeJzt3XlUVGe6LvCnELhOicZEglJoeQtspgiooEnukjIGMdqY\nTgSu0Y4eB/qs5OSmTZR25fY9R20v4hBXWnSlz4km5prOwenYB+MxKA6lJgqomO4ocUwRQMVunFpE\nKIbv/kEgzFSxd9Ue6vmtVWtRUNR+1fLh5av97s8ghBAgIiLN8VK6ACIi6hkGOBGRRjHAiYg0igFO\nRKRRDHAiIo1igBMRaZTkAL937x6SkpIQGhqKsLAw5OXlyVEXERF1w1vqE/z617/G1KlTsXv3btTV\n1eHhw4dy1EVERN0wSBnkuX//PqKjo/H999/LWRMRETlA0hKKzWbD4MGDMW/ePIwePRqpqamoqqqS\nqzYiIuqCpACvq6tDYWEh3nzzTRQWFqJfv35YvXq1XLUREVFXhAQ3b94UJpOp+f6JEyfEtGnTWj3G\nbDYLALzxxhtvvDlxM5vN3WawpA7c398fgYGBuHz5MgDg0KFDCA8Pb/WYa9euQQihqtuyZcsUr0Er\ndbEm1uQJdamxpmvXrnWbwZLPQtm4cSNmz54Nu90Os9mMrVu3Sn1KIiJygOQAj4yMxOnTp+WohYiI\nnOCRk5gWi0XpEjqkxrpYk2NYk+PUWJcaa3KEpPPAHTqAwQAXH4KISHccyU6P7MCJiPSAAU5EpFEM\ncCIijWKAExFpFAOciEijGOBERBrFACci0igGOBGRRjHAiYg0igFORKRRDHAiIo1igBOR9lRWAsXF\nSlehOAY4EWlLUREQEwN8/rnSlSiOAU5E2pGVBcTFAWlpwG9/q3Q1ipO8oQMRkcvV1ACLFwM5OUBu\nLhAVpXRFqsAAJyJ1KykBkpOBoUOBM2eAg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TRZtWoVSktLYbPZsH37drzw\nwgvYtm2bojX5+/sjMDAQly9fBgAcOnQI4eHhitYENL5/mJeXh0ePHkEIgUOHDiEsLKzjB7vqp8ie\nPXuE0WgUvXv3Fk8//bSYMmVK89fS09OF2WwWP/vZz5rPBHG306dPi9jYWBEZGSnGjx8vCgsLFamj\nJbvdLn75y1+KiIgIMXr0aHH06FGlS2plxIgRqjkLJSgoSAwbNkxERUWJqKgo8cYbbyhWy/79+8XI\nkSOF2WwWq1atUqyOJidOnBAGg0FERkY2//18+eWXSpfVzGq1quYslG+++UaMHTtWjBo1Srzyyiuq\nOAtFCCHWrFkjwsLCREREhJgzZ07zmWltcZCHiEij1PF2MBEROY0BTkSkUQxwIiKNYoATEWkUA5yI\nSKMY4EREGsUAJyLSKAY4EZFG/X8Kg9CDsfHy3AAAAABJRU5ErkJggg==\n",
"text": [
"<matplotlib.figure.Figure at 0x4352b50>"
]
}
],
"prompt_number": 5
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
Jinja2==2.7.1
MarkupSafe==0.18
Shapely==1.2.18
argparse==1.2.1
descartes==1.0.1
distribute==0.6.34
ipython==1.1.0
matplotlib==1.3.1
nose==1.3.0
numpy==1.8.0
pyparsing==2.0.1
python-dateutil==2.2
pyzmq==14.0.1
six==1.4.1
tornado==3.1.1
wsgiref==0.1.2
@stuarteberg
Copy link

Found this with teh google. Thanks for posting it!

For future readers: I had to add %matplotlib inline to the top of the notebook to get it working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment