On Sun, Apr 18, 2010 at 10:52 PM, E. Antero Tammi
<[email protected]> wrote:
> Hi,
>
> I'm investigating ways to implement some "2.5D" geometrical operations with
> python. So far I found shapely most prominent with "pure 2D" geometry.
>
> Operations I need to implement (beyond shapely's funtionality) includes
> among:
> - project points and lines to lines (2D and 3D) and planes ("2D entities
> embedded in 3D")
> - "multilines", not like shapely's multilinestrings, but rather kind of
> "parallel shifts of a baseline". Kind of the sence that the "parallel" lines
> are actually specified with perpendicular distancies from the baseline, and
> are not necessary constant along the whole baseline.
> - rotations and translations of points, lines and planes around a 3D point
> - rotations and translations of points and lines around a 3D line
>
> I would like to ask experts opion wheter I should try to inherit directly
> from the shapley's classes or would it be more suitable to create own
> classes and "interact" shapely only when needed?
>
> Any pointers to pythonic "2.5D" geometry are appreciated. Also I do realize
> that shapley is based on "proper" 2D topology. However I'm not aware of
> equivalent "2.5D" topology, any such pointers?.
>
> Regards,
> eat

Hi,

I recommend following a pattern like Zope's adapter instead of
deriving from Shapely classes, and Shapely supports this pattern with
2 options. If your class provides either the Numpy array interface or
the so-called "Python geo interface", you can use
shapely.geometry.asShape to adapt your own instances without copying
coordinate data. You might want to use Numpy anyway for your spatial
math, so that would seem to be the better option. The same adapter
pattern will be supported in future versions of Shapely.

I'm not aware of theory or standards around 2.5D topology. I hope
someone else will respond with good references.

Cheers,

-- 
Sean
_______________________________________________
Community mailing list
[email protected]
http://lists.gispython.org/mailman/listinfo/community

Reply via email to