-
Notifications
You must be signed in to change notification settings - Fork 2
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
Gaps show in the components overview but not in the editing view #6761
Comments
So strange! I can verify this is happening for me, too. |
The ProblemSo I've been taking a look at this issue, specifically at the function
This function receives a PointerEvent click, so I inspected the event and specifically the The problem does not seem to be with those functions, they appear to be running as expected; however, while testing the event object itself (e), it does not contain the complete shape. This is for example a path near the Krieg Field Softball Complex: The strange thing is that when I click on one side of the same feature, mapbox returns a line made up of 52 coordinates, when I click on the opposite side it returns 49. It would seem to be that the whole feature consists of all 49+52 coordinates, but we only get a fraction every time we click. Things I've attempted to find a fix:
Moving Forward
|
@patrickm02L @amenity @mateoclarke I am going to put this in blocked for now. I think this needs GIS inspection, and if they determine it looks fine then I can continue debugging. Feature details:
|
@sergiogcx - gotcha. Thanks for all the research. Asking @johnclary what to do with this next... |
thanks for the research @sergiogcx. i'm going to to a little digging based on what you found and may pass it to Alan. |
@sergiogcx read here for an explanation of why features are being split. Because our layer source is a a vector tileset - features are arbitrarily split into tiles. I think this is not noticeable visually when selecting features because Mapbox is styling the hover effect based on a feature ID that is common to both halves of the feature. Here is a long thread discussing possible changes to the tile specification to address this—but it is dormant and does not present any current workarounds. This is going to be tricky. There's nothing we can do on the GIS side to process the tiles in a way that will preserve features entirely. Some googling may turn up examples from folks that have solved it. A few ideas:
2a. Create an onClick callback function that filters all map features based on the clicked feature ID and merges their geometry before saving. This would involve interating through all (most?) features in the layer, and I assume it would be quite slow. I think this is the approach taken in the GIS stack exchange thread I posted above. 2b. Possibly involving turfjs—query features within x distance of a clicked feature. this radius could be fairly large—e.g. 1000 meters, and filters those features for split features based on feature ID. Essentially the same as option 2a but we would filtering a smaller number of features. Mapbox example.
I'm curious if @alan-deanda or @frankhereford have any ideas as well. Perhaps we should meet. |
I agree that this is a tricky problem. Features broken over tiles is one of those recurring things you see when you least want to. Take this idea with a grain of salt, just spit-balling here. Since both portions of the feature are available in memory and can be identified due to the common feature ID field, it may be possible to utilize TurfJS' I'll look into some stuff I've done in the past working with features that come down via vector tiles and report back if I find anything useful. Also, I'd be more than happy to meet on the issue if you all feel that would be helpful. |
@amenity - yes. thanks @frankhereford. i just ran a few tests and was able to get split features with |
Moped
Gaps showed in the components overview but not in the editing view. Check the project indicated in link and screenshot
No
https://mobility.austin.gov/moped/projects/52?tab=map
Internet Browser: Firefox
Attachment (296.92kb)
Request ID: DTS21-102365
The text was updated successfully, but these errors were encountered: