Open michaelkirk opened 2 years ago
@michaelkirk Can you try this again with your WKT file?
Still not working for me - I get the same behavior as before, dumping the same log message as before.
Contents of my WKT file:
POLYGON((367.67936762793977 302.785219017324,400 330.3364189888756,400 85.7094729663055,375.530089594595 124.2204839556052,374.98659859747573 100.58888400844128,375.3219047536835 76.99586322948593,352.116978342238 128.0069901264593,296.8607072090515 129.49256607782735,266.8397653781389 154.40474480753,259.2004570591687 144.14650678216447,247.73005601682144 120.74050514867251,219.9183226476331 53.89398800789357,214.79766598486256 58.54396880088095,205.3180727584858 37.66458141235276,204.9384743502853 42.52909575499811,198.598592783954 39.913773753454365,227.5571963507852 98.78793110381741,211.8877775129764 95.80693442569219,184.82983774975878 111.82526107380869,157.3407287714804 79.95610899189123,146.98556814305613 90.1306295921712,142.86571296028092 103.2131667249273,137.06964785547663 97.97823184186473,133.11594113032265 121.5727268145846,121.48741956113471 112.97229086146046,121.26181604684658 113.86710164957617,235.63037504441513 197.77142864845837,222.76475236003864 233.7471699986308,215.48785333121916 232.73364849354883,177.32511967843928 245.4303896678587,96.36950989237457 246.12195328963338,96.33638429757961 248.20750628598208,66.27444465680952 250.87823764635957,0.00000000000005684341886080802 252.7246858385403,0 287.00851453579764,87.0909970255105 274.6019377637631,203.35149933375834 279.95282911519445,186.21553206604779 286.312588294279,200.37329511724553 288.3389752542301,204.07584923592933 288.2701221108328,208.48923723966695 286.23369014455,212.24082541367974 285.47846008552216,213.481559734292 289.176602821379,168.6386654992429 312.61353982953256,162.45878409633931 319.40542293651487,93.1525434103433 357.43372298059234,91.50558129979011 359.2500343818318,91.43334419528333 363.2318140095328,178.69748010894065 313.3107247292978,201.68701198375604 314.2277627894801,217.6731029946546 302.77563506887896,221.61838827018173 313.1570930513446,221.67982343202226 315.355350903515,243.8528456455854 299.9323675588228,367.67936762793977 302.785219017324))
It works with this simplified WKT file:
POLYGON((0 0, 0 10.0, 10.0 10.0, 10.0 0, 0 0))
Since I can't pick my projection, I suppose rgis must be guessing some projection for my data - is that right?
Maybe the issue is related to the data in my first file not being valid for the guessed projection - e.g. it has values greater than 180, which might be problematic if you're assuming lon/lat coordinates.
Yeah it's assuming the source is EPSG:4326 for everything unfortunately https://github.com/frewsxcv/rgis/blob/9dc1d13aaf8dc1878cfab92fd30963ca12eca7e1/rgis-ui/src/add_layer_window.rs#L184
Hah I guess I already knew (and forgot) this: https://github.com/frewsxcv/rgis/issues/92
So, maybe the way to organize it is that #92 is tracking a way to specify which projection your uploaded data has. And #93 (this one) is to more gracefully handle receiving invalid data for the given projection.
edit: This only seems to occurs when the uploaded data is invalid for the assumed projection.
The app becomes unresponsive after trying to load a WKT layer from file.
https://user-images.githubusercontent.com/217057/194164359-f6c9c0e7-0461-48fd-bcd7-46c1a4d51c32.mp4
The actual crash seems to be:
With the full log: