Comments (14)
Here is an update for Ruby script that compares WKT without calling .sh
(it invokes Spatialite before, comparing takes ~2 minutes)
alex85k/osm-testdata@bb6a743
Previous version also did not do "exit 1" if one of the tests fail.
Please do not forget to check the code and test on Linux/BSD, I am Ruby-newbie :)
To fix running tests on Windows the following patch is needed:
alex85k@fa1d18e
Good news: all the tests for libosmium passed!
from libosmium.
Great work @alex85k! I took me a while to compare the ruby code to the shell code and test it to make sure it does the same thing. I have added everything (and made a few changes). Once you have verified my changes, we can close this issue.
Unfortunately the compare-areas.rb is now even slower than before (why I don't understand) and the code is still horrible, not your fault, it was horrible before. Much too complex for my comfort. Someday somebody has to refactor this.
from libosmium.
Yes, it is really huge :) I tried to get rid of spatialite by using https://github.com/rgeo/rgeo but it did not fully work with my geos installation.
Thank you for fixes!
One little problem remains:
34: C:/winbuilds/osm-testdata/bin/compare-areas.rb:91:in `delete': No such file or directory - compare-wkt-tmp.db (Errno::ENOENT)
34: from C:/winbuilds/osm-testdata/bin/compare-areas.rb:91:in `spatial_sql'
34: from C:/winbuilds/osm-testdata/bin/compare-areas.rb:111:in `compare_wkt'
34: from C:/winbuilds/osm-testdata/bin/compare-areas.rb:135:in `compare_geom'
34: from C:/winbuilds/osm-testdata/bin/compare-areas.rb:142:in `compare_area'
34: from C:/winbuilds/osm-testdata/bin/compare-areas.rb:158:in `block (2 levels) in check_variant
Removing File.delete
line does not help - there are "Process can not access occupied file" errors.
from libosmium.
There is a reason I am using the external spatialite binary: I had problems that with some invalid geometries I had crashes, so the test framework would just die. Putting those critical task in an extra program is an insurance against those problems.
Not sure how the database can not be there. You can try putting the begin/rescue around it like a few lines above.
from libosmium.
After experiments I have some working variant. The problems was caused by reusing compare-areas.log in two subshell (concurrent file access caused problems).
So the proposed fix is here: alex85k/osm-testdata@7bde7be
from libosmium.
I don't like this because then you can't see which output in the 'err' file belongs to which output in the 'log' file. Output to the same file in append mode should be fine. If Windows can't do this, then we'll have to read the file generated by spatialite back in Ruby and add the contents to the log file.
from libosmium.
Second variant will work. The first is certainly impossible on Windows.
from libosmium.
I have the script with error-file-copying-into-logfile:
alex85k/osm-testdata@e2e05cb
To pass test I had to increase timeout to 300 sec - it took 258s on my Core i7 notebook (Debug version of spatialite).
Could you check?
from libosmium.
I have used your patch. Thanks. Looks like this is resolved now.
from libosmium.
Thank you, all is working!
But the 60 ms timeout for testdata-multipolygon date is too low for debug version (takes 250 on debug+static spatialite...) :)
from libosmium.
I am not setting any timeouts. Where does it come from?
from libosmium.
From the cmake scripts, this one is failing :)
from libosmium.
Ah, I keep forgetting about those cmake scripts. Fixed now.
from libosmium.
Thank you, now the tests will pass without problems.
from libosmium.
Related Issues (20)
- o5m parser issue HOT 2
- o5m parser issue, part 2 HOT 3
- Anychance to have a C interface ? HOT 1
- ctest failing on newly compiled code HOT 1
- Please reconsider the fadvise() usage HOT 3
- Increase maximimum integers in opl_parser_functions.hpp HOT 4
- Lots of warnings after #5d50405 in VS2019 HOT 5
- Unable to compile with c++20 when using precompiled binaries HOT 8
- Failing to compile libosmium: 'protozero/types.hpp' file not found HOT 5
- Incorrect proj usage HOT 1
- libosmium no longer successfully builds after `v2.17.1` on CentOS 7 HOT 2
- Need help, how to add altitude to libosmium HOT 2
- Missing prepare_for_lookup in test_members_database.cpp HOT 1
- heads-up: PROJ_LIB is now deprecated (use PROJ_DATA instead)
- io_test_bzip2 fails on Alpine Linux HOT 3
- AppVeyor builds fail due to missing LZ4 HOT 5
- Print offending string in PBF-Decoder
- installation make error HOT 2
- Does libosmium work with MacOS (M series chip)
- Performance Issues with `timegm` called from `parse_timestamp` on iOS 16.2 HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libosmium.