feat(research): preserve urban geometry pipelines and qualification suites
Preserve offline geometry, marking, replay and evaluation pipelines with source manifests and synthetic tests. Research qualification does not activate these methods as production navigation.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
"""Transform complete catalog geometry and its probes through the same frame."""
|
||||
import numpy as np
|
||||
from shapely.ops import transform
|
||||
|
||||
def points_in_frame(points,matrix):
|
||||
h=np.asarray(matrix,float);xy=np.asarray(points,float)
|
||||
p=np.c_[xy[:,:2],np.ones(len(xy))]@h.T
|
||||
if np.any(abs(p[:,2])<1e-8):raise ValueError('Singular glyph frame')
|
||||
return p[:,:2]/p[:,2,None]
|
||||
|
||||
def geometry_in_frame(geometry,matrix):
|
||||
def fn(x,y,z=None):
|
||||
p=points_in_frame(np.c_[x,y],matrix);return p[:,0],p[:,1]
|
||||
return transform(fn,geometry)
|
||||
Reference in New Issue
Block a user