You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used the snapping of Geotrek-admin to allow users to snap anything to a stream.
I found out that this snapping effect does not work anymore. Snapping between 2 paths in GeotrekCE/Geotrek-admin, is updated thanks to the triggers. The snapping is only visual. Normally, It was finding which vertices of the new created/edited path snap on the other paths.
Technically, this is a problem in the Javascript
Problem on Geotrek-admin :
Creation of the Path :
The path is not cut :
Here, we can see, if we have 2 long paths, it snaps visually but not in the database and distance of snapping in triggers is not big enough to snap and cut these 2 paths. The Path 5344 should be cut in half.
I logged the messages of the data which will be treated and sent to the database :
Here it sends the geometry and then the snaplist, it should be :
[null, <id_tronçon>]
I beginned to work on a fix (#24) on Georiviere because we don't have any triggers that allow to snap in the database afterward.
With this correction, we can snap geometries without triggers.
New problem
In Geotrek-admin and Georiviere-admin we store geometries in the Spatial Reference System Identifier 2154 (Lambert-93), or others identifier depending on the place of the world but it's always coordinates in meters.
Visually when we move objects on the map, the Identifier is 4326. Then, we need to transform geometries stocked in SRID 2154 to geometries in SRID 4326. After the transformation we show this new geometry on the map.
The problem here is when we show this new geometry this is not exactly the same as the one in the old identifier.
After that i fixed the snaplist, we could snap any geometry on streams but with these transformation, visually the geometry is not snapped :
On Qgis, we can see that the point is actually snapped on the geometry in 2154. Unfortunately, visually the stream in 4326 do not touch the object.
In conclusion, should objects snap the stream in the database or only visually ?
The text was updated successfully, but these errors were encountered:
Salut @LePetitTim !
Merci pour cette analyse bien précise, à mon avis il faut que le snap soit opérationnel dans la base et en visualisation pour une cohérence et une compréhension par l'utilisateur et une bonne gestion à long terme de la base par les administrateurs !
Et pour la visualisation il faut effectivement qu'elle soit la plus juste possible et éviter les décalages lié au SRID qui j'imagine apporteront des problèmes de snap !
I used the snapping of Geotrek-admin to allow users to snap anything to a stream.
I found out that this snapping effect does not work anymore. Snapping between 2 paths in GeotrekCE/Geotrek-admin, is updated thanks to the triggers. The snapping is only visual. Normally, It was finding which vertices of the new created/edited path snap on the other paths.
Technically, this is a problem in the Javascript
Problem on Geotrek-admin :
Creation of the Path :
The path is not cut :
Here, we can see, if we have 2 long paths, it snaps visually but not in the database and distance of snapping in triggers is not big enough to snap and cut these 2 paths.
The Path 5344 should be cut in half.
I logged the messages of the data which will be treated and sent to the database :
Here it sends the geometry and then the snaplist, it should be :
I beginned to work on a fix (#24) on Georiviere because we don't have any triggers that allow to snap in the database afterward.
With this correction, we can snap geometries without triggers.
New problem
In Geotrek-admin and Georiviere-admin we store geometries in the Spatial Reference System Identifier 2154 (Lambert-93), or others identifier depending on the place of the world but it's always coordinates in meters.
Visually when we move objects on the map, the Identifier is 4326. Then, we need to transform geometries stocked in SRID 2154 to geometries in SRID 4326. After the transformation we show this new geometry on the map.
The problem here is when we show this new geometry this is not exactly the same as the one in the old identifier.
After that i fixed the snaplist, we could snap any geometry on streams but with these transformation, visually the geometry is not snapped :
On Qgis, we can see that the point is actually snapped on the geometry in 2154. Unfortunately, visually the stream in 4326 do not touch the object.
In conclusion, should objects snap the stream in the database or only visually ?
The text was updated successfully, but these errors were encountered: