I get this error message when executing your code:

ERROR:shapely.geos:TopologyException: depth mismatch at  at
581037.39250326285 4509301.9737485535


Have no idea what this means, but maybe you know))

Cheers


2014-04-28 14:55 GMT-04:00 Alex Flint <alex.fl...@gmail.com>:

> The following code produces an exception under shapely (python version)
> 1.3.0
>
>     import shapely.geometry
>     path = shapely.geometry.LineString([
>         [581037.19575668662, 4509299.98342364],
>         [580996.61134201661, 4509304.202782942],
>         [581037.19575668662, 4509299.98342364],
>         [581072.19594137045, 4509296.7024005251],
>         [581072.19594137045, 4509296.7024005251],
>         [581037.19575668662, 4509299.98342364]
>     ])
>     path.parallel_offset(2, shapely.geometry.JOIN_STYLE.mitre)
>
> The exception is:
>
>     File
> "/Users/alexflint/Code/wifi-localization/tools/localization/estimation/scripts/shapely_bug.py",
> line 39, in <module>
>       linestring.parallel_offset(2, shapely.geometry.JOIN_STYLE.mitre)
>     File
> "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/shapely/geometry/linestring.py",
> line 114, in parallel_offset
>       bool(side == 'left')))
>     File
> "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/shapely/geometry/base.py",
> line 55, in geom_factory
>       raise ValueError("No Shapely geometry can be created from null
> value")
>     ValueError: No Shapely geometry can be created from null value
>
> The points on the path above are actually very close to collinear, but my
> understanding was that parallel_offset should work regardless. I have
> attached a plot of the path itself.
>
> Any suggestions for what's going on here?
>
> Alex
>
>
> _______________________________________________
> Community mailing list
> Community@lists.gispython.org
> http://lists.gispython.org/mailman/listinfo/community
>
>


-- 
Sasha
_______________________________________________
Community mailing list
Community@lists.gispython.org
http://lists.gispython.org/mailman/listinfo/community

Reply via email to