nvector icon indicating copy to clipboard operation
nvector copied to clipboard

`GeoPath.intersect` should return `GeoPoint`

Open kastork opened this issue 4 years ago • 2 comments

The intersect method on GeoPath objects claims to return an instance of GeoPoint, which seems like the desired behavior (at least, that is what I want it to return too). However it returns an instance of Nvector.

From the last line of the intersect method...

return frame.Nvector(normal_c, z=depth)

kastork avatar Nov 21 '21 01:11 kastork

Hello @kastork

I have taken the liberty to fork the nvector package into a new PyPI package titled envector. The envector package is intended as a drop-in replacement with minimal changes in your source code as no methods and classes have been removed since the fork. For example, this is a valid snippet

import envector as nv
wgs84 = nv.FrameE(name='WGS84')

As for your issue, I also caught that mistake when I updated the docstrings and add type-hints. If you examine the envector.objects.GeoPath.intersect method, you will find the correction you suggested. I also re-rendered its public documentation pages. I am little displeased with the type-hint being a private super-class, but the documentation is better at least.

EDIT: Inject language into snippet

mhogan-nwra avatar Sep 09 '24 21:09 mhogan-nwra

That’s great, thank you.

kastork avatar Sep 10 '24 14:09 kastork

Also fixed in nvector in SHA-1: e6596f541080a126534cecc00912ce790e14d078

pbrod avatar Oct 04 '24 06:10 pbrod