Skip to content
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

Coordinate accuracy #4

Open
roelderickx opened this issue May 12, 2021 · 2 comments
Open

Coordinate accuracy #4

roelderickx opened this issue May 12, 2021 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@roelderickx
Copy link
Owner

roelderickx commented May 12, 2021

After a system upgrade (python from version 3.9.2 to 3.9.4 and GDAL from version 3.0.4 to 3.2.2) the testcases fail. Here is an example of the first nodes before and after the upgrade:

-  <node visible="true" id="-2" lat="49.210517895" lon="-122.869117973"/>
+  <node visible="true" id="-2" lat="49.210518573" lon="-122.869133894"/>

-  <node visible="true" id="-3" lat="49.210522516" lon="-122.867400328"/>
+  <node visible="true" id="-3" lat="49.210523197" lon="-122.8674163"/>

-  <node visible="true" id="-5" lat="49.211948022" lon="-122.86739095"/>
+  <node visible="true" id="-5" lat="49.211948704" lon="-122.867406972"/>

-  <node visible="true" id="-6" lat="49.211944294" lon="-122.864626998"/>
+  <node visible="true" id="-6" lat="49.211944981" lon="-122.864643102"/>

-  <node visible="true" id="-8" lat="49.208017674" lon="-122.87588432"/>
+  <node visible="true" id="-8" lat="49.208018337" lon="-122.875899951"/>

A similar problem can be seen for the tags. However, contrary to the coordinates which are fetched as doubles the attributes are fetched as string.

-    <tag k="YTD_COST" v="1.54"/>
+    <tag k="YTD_COST" v="1.540000000000000"/>

-    <tag k="LC_COST" v="19.60"/>
+    <tag k="LC_COST" v="19.600000000000001"/>

This leaves a couple of open questions:

  • Which component is to blame?
  • In what version was it introduced and what issue was being tried to resolve?
  • Is the new version more or less accurate than the old version?
  • Is there are parameter which can be set to obtain the same result for all versions, preferably the most accurate?
@roelderickx roelderickx added the help wanted Extra attention is needed label May 12, 2021
@roelderickx
Copy link
Owner Author

I have tried downgrading GDAL to version 3.0.4 to no effect. I set up docker using the Dockerfile from @HSLdevcom (thanks!) but the results are still not the same as before.

@roelderickx
Copy link
Owner Author

An updated docker image is available in the master branch using the default ubuntu packages for GDAL. All test cases pass succesfully in this image, at least there is a reliable test environment now.
The problem described in this issue is reproducible using the docker image from osgeo/gdal, using the latest version of GDAL.

FROM osgeo/gdal:ubuntu-full-3.2.2

WORKDIR /app

RUN apt-get update \
  && apt-get install -y \
    libprotobuf-dev \
    libxml2-utils \
    osmctools \
    protobuf-compiler \
    python3-pip

RUN pip3 install \
  --no-cache-dir \
  cram \
  lxml \
  protobuf

# A clumsy hack to avoid errors
RUN cd /usr/lib/python3/dist-packages/osgeo \
  && ln -s ./_gdal.cpython*.so ./_gdal.so \
  && ln -s ./_gdal_array.cpython*.so ./_gdal_array.so \
  && ln -s ./_gdalconst.cpython*.so ./_gdalconst.so \
  && ln -s ./_gnm.cpython*.so ./_gnm.so \
  && ln -s ./_ogr.cpython*.so ./_ogr.so \
  && ln -s ./_osr.cpython*.so ./_osr.so

ENV PYTHONPATH=/usr/lib/python3/dist-packages/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant