Comments (7)
"We don't know how to count that low!"
osm_name_from_wpt() is identifying all four point of this to be the same point. That's admittedly not very awesome, but it's also below the lower bounds of anything we care about. (See earlier on "not professional surveying" and "billions served".)
It's not even really some decision where we consciously enforce a lower bound. osm_name_from_wpt() returns the same value for all points and so the rest of the code ends up thinking we're a point instead of a box when it later attempts to split it into quadrants. Just bumping up the number of kept digits would slow the writer for everyone else.
If I were to take any action here, it would be to issue an error message and die upon detecting this case. Maybe we could detect this and collapse the wayward way[] into a node and not blow up performance. Maybe.
Honestly, unless this bothers someone from the OSM team badly enough for them to address this, I don's see this getting any traction.
from gpsbabel.
As a workaround you can use the transform filter, which will have the side effect of naming the points. This will cause the osm writer to recognize them as being different. However, it will also cause the first and last point in the LinearRing to be transformed into different nodes.
./bld/gpsbabel -t -i kml -f x.kml -x transform,rte=trk,del -o osm -F -
from gpsbabel.
Maybe have an environment variable where people could increase the sensitivity without it wrecking it for others.
You got a whole field of catastral mapping that you're locking the application out of.
from gpsbabel.
Actually, if you think about it, here we're trying to perform a very valuable task. It doesn't involve interpolating the numbers at all. It's just rearranging them into a different format.
It's almost as if we need to encode our numbers or rot13 (probably wouldn't work) to keep the program from thinking too much about them.
Therefore there needs to be a mode, that just simply disengages any introspection of the numbers at all, allowing rearrangement of them, unhindered.
from gpsbabel.
Six digits gets below .4mm, which is on on the order of the thickness of a nice business card. I can live with that.
Me too, but -o osm was blowing up at even one meter,
$ perl -wle 'printf "%.9f\n", 24.1817855 - 24.1817765;'
0.000009000
$ perl -wle 'printf "%.9f\n", 360/40000000;'
0.000009000
So something indeed is wrong.
from gpsbabel.
OsmFormat::osm_name_from_wpt uses QString::arg(double) with one argument, which by default uses format specifier 'g' with a precision of -1. QLocale shows format specifier 'g' interprets precision as the "maximum number of significant digits (trailing zeroes are omitted)", and " any negative precision is ignored in favor of the default, 6." Thus OsmFormat::osm_name_from_wpt may not get us to six digits after the decimal point.
This can be verified by with the example from #1047 using qDebug to print the names:
"\u000124.1818\u0001120.864"
"\u000124.1818\u0001120.864"
"\u000124.1818\u0001120.864"
"\u000124.1818\u0001120.864"
"\u000124.1818\u0001120.864"
1-e6 degrees is 0.11 meters at the equator, not 0.4mm as stated in #1048.
I would suggest explicitly setting the fieldwidth, format and precision to 0, 'f', and 6 respectively when converting latitude and longitude in osm_name_from_wpt.
from gpsbabel.
The current behavior is a result of 4673a257576e7bd5e August 4, 2013. Before that commit we used xasprintf with a format %f. From https://en.cppreference.com/w/cpp/io/c/fprintf I believe that would use 6 digits after the decimal point.
from gpsbabel.
Related Issues (20)
- gpx writer may violate schema HOT 1
- gpx writer can violate schema when extensions exist, gpx read and write versions differ, and passthrough is used. HOT 1
- gpx.h GEOTAG searches for elements that imply a gpx schema violation HOT 9
- C++20? HOT 12
- jeeps bug? HOT 2
- GPS serial memory leak? HOT 2
- Broken link to Entire Manual as PDF HOT 4
- garmin gpi corruption of bitmap color data for bitmaps with 24 bits per pixel. HOT 1
- erroneous garmin gpi warning when writing with a 24 or 32 bits per pixel bitmap HOT 1
- Please restore compegps format HOT 1
- Doc: inaccurate statement regarding GDAL
- Is there somewhere to download old exe files? HOT 2
- Exporting as GPX always fills "<cmt>" and "<desc>" even if not existent in the source file HOT 8
- Merging two files, but preferring data from one of those files, and interpolating the other HOT 2
- GPSBabel doesn't seem to filter points by date/time bounds HOT 3
- Your site www.gpsbabel.org has been down for several days. Could you fix this? HOT 1
- [feature request] Parsing of Google Takeout TimeLine records.json file HOT 5
- [feature request] Older Versions Download HOT 1
- Retire Qt5 HOT 1
- Style constant CR incorrectly mapped for style files HOT 1
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 gpsbabel.