Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fwa_locatealong returns two results when provided a measure shared by stream endpoints #81

Closed
smnorris opened this issue Mar 6, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@smnorris
Copy link
Owner

smnorris commented Mar 6, 2022

Function should choose just one location.
For example

# select postgisftw.fwa_locatealong(356493192, 340.150635772625);
                                  fwa_locatealong                                   
------------------------------------------------------------------------------------
 01010000E0BD0B0000F4FF7ECDEF593841BE51BB372B721F4101BC749318A07B4083500E0169427540
 01010000E0BD0B0000736891CDEF59384185EB51382B721F4101BC749318A07B4083500E0169427540
(2 rows)

# select linear_feature_id, downstream_route_measure, upstream_route_measure 
from whse_basemapping.fwa_stream_networks_sp
where blue_line_key = 356493192 and downstream_route_measure < 341
order by downstream_route_measure limit 2;

 linear_feature_id | downstream_route_measure | upstream_route_measure 
-------------------+--------------------------+------------------------
         707281883 |                        0 |     340.15127525919155
         707281606 |         340.150635772625 |      971.0342820216467
(2 rows)


@smnorris smnorris added the bug Something isn't working label Mar 6, 2022
@smnorris
Copy link
Owner Author

smnorris commented Mar 6, 2022

The results of above query relate back to #79 - the upstream measure of the downstream feature should be exactly the same as the downstream measure of the upstream feature (or at least closer than 1cm). Deriving both measures from the geom should fix this (but probably would not fix this issue).

@smnorris
Copy link
Owner Author

Rounding above measures to nearest cm helps but fwapg should support measures to the nearest mm - because streams really can be that short.

smnorris added a commit that referenced this issue Apr 20, 2022
@smnorris
Copy link
Owner Author

Closing in favour of #79

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant