Giter VIP home page Giter VIP logo

Comments (17)

tyrasd avatar tyrasd commented on June 4, 2024 1

Printing the coordinates shows only integer values. Then, I've played around the language settings and found out that setting the Number format in Regional Formats in Ubuntu's language settings (see screenshot) to something English "resolves" the issue for me. Setting it back to German results in coordinate truncations.

screenshot from 2014-10-19 12 47 41

from quickosm.

mmd-osm avatar mmd-osm commented on June 4, 2024

I tried one of the demo queries (Shop) but couldn't reproduce this issue. QGIS is running in German as well.

qgis4

OSM map was added as background image for illustration purposes.

You could maybe try a custom layer description: concat (tostring( $x), ' ', tostring( $y )) to see the lat/lon infos as label next to each node:

qgis5

from quickosm.

mmd-osm avatar mmd-osm commented on June 4, 2024

Interesting. I'm running the following settings without issue. Maybe there's some other parameter somewhere in QGIS?!

qgis7

from quickosm.

Gustry avatar Gustry commented on June 4, 2024

For each query, you'll find, in your temp folder, the raw dowloaded file *.osm, then a *.geojson and finally a *.shp. The shapefile will be in "processing" of the temp folder.
Could you try these 3 files and tell us which file are affected by this bug ?

from quickosm.

tyrasd avatar tyrasd commented on June 4, 2024

The .osm and .geojson files in /tmp are fine. Only the resulting shapefile shows truncated coordinates.

from quickosm.

Gustry avatar Gustry commented on June 4, 2024

Hum... The transformation from geojson to shapefile is done by QgsFileWriter since 1.1. On 1.0 it was ogr2ogr : 940bb90
From OSM to geojson : https://github.com/3liz/QgisQuickOSMPlugin/blob/master/CoreQuickOSM/Parser/OsmParser.py#L176
And then from geojson to shapefile : https://github.com/3liz/QgisQuickOSMPlugin/blob/master/Controller/Process.py#L95

from quickosm.

tyrasd avatar tyrasd commented on June 4, 2024

ok, turns out my version of QGIS truncates the coordinates also when opening geojson files directly. So, I guess this is a QGIS bug? (This used to work with QGIS 2.0 which I had installed previously. btw: I've installed QGIS 2.4 via ubuntugis)

from quickosm.

mmd-osm avatar mmd-osm commented on June 4, 2024

fyi: I've installed QGIS 2.4 via http://qgis.org/en/site/forusers/alldownloads.html#ubuntu + QGIS Stable packages on plain ubuntu but I'm unable to reproduce the issue on that version.

QGIS Help->About has some detailed version infos of all involved components:

Description Version Description Version
QGIS-Version 2.4.0-Chugiak QGIS-Codeversion exported
Kompiliert gegen Qt 4.8.6 Laufendes Qt 4.8.6
Kompiliert mit GDAL/OGR 1.10.1 Läuft mit GDAL/OGR 1.10.1
Kompiliert mit GEOS 3.4.2-CAPI-1.8.2 Läuft mit GEOS 3.4.2-CAPI-1.8.2 r3921
PostgreSQL-Client-Version 9.3.4 SpatiaLite-Version 4.1.1
QWT-Version 5.2.3 PROJ.4-Version 480
QScintilla2-Version

You could check the shape files by running e.g. ogrinfo -al multipolygonsquickosm.shp in the temp directory. In my case, both lat/lon coordinates look ok (not truncated):

OGRFeature(multipolygonsquickosm):25
  full_id (String) = w76186459
  osm_id (String) = 76186459
  osm_type (String) = way
  building (String) = yes
  shop (String) = supermarket
  name (String) = Carrefour Market
  building_p (String) = (null)
  roof_mater (String) = (null)
  roof_heigh (String) = (null)
  height (String) = (null)
  roof_shape (String) = (null)
  website (String) = (null)
  brand (String) = (null)
  operator (String) = Carrefour
  wheelchair (String) = (null)
  addr_house (String) = (null)
  addr_city (String) = (null)
  addr_postc (String) = (null)
  addr_count (String) = (null)
  addr_stree (String) = (null)
  tourism (String) = (null)
  wheelcha_1 (String) = (null)
  wheelcha_2 (String) = (null)
  phone (String) = (null)
  amenity (String) = (null)
  wall (String) = (null)
  layer (String) = (null)
  addr_hou_1 (String) = (null)
  POLYGON ((3.8871116 43.6261383,3.8874954 43.6261388,3.8874961 43.6261278,3.8875824 43.6261278,3.8878846 43.6259574,3.8878937 43.6259659,3.8879561 43.6259308,3.887834 43.6258162,3.8878303 43.6258134,3.8878633 43.6257946,3.8878679 43.6257986,3.8879544 43.6258794,3.8880035 43.6258519,3.8879178 43.6257723,3.8876827 43.6255528,3.8876444 43.6255728,3.8875169 43.6256431,3.887413 43.6255445,3.8873827 43.6255615,3.8869147 43.6258239,3.8870249 43.625927,3.8871097 43.6260095,3.8871116 43.6261383))

from quickosm.

Gustry avatar Gustry commented on June 4, 2024

I have this bug too since I've reinstalled my OS.
However, I can't solv this bug by changing my settings into english.

The geojson, which contains decimals in a text-editor, can't by open correctly in QGIS.
I've opened an issue on qgis : http://hub.qgis.org/issues/11587

from quickosm.

mdouchin avatar mdouchin commented on June 4, 2024

I leave the bug closed, but here is a quick workaround in linux distros. Run QGIS from command line like this

LC_NUMERIC="C" /usr/bin/qgis 1> /dev/null 2> /dev/null

Which forces QGIS to use the dot as decimal separator

from quickosm.

Gustry avatar Gustry commented on June 4, 2024

Thanks @mdouchin !
If you have this problem, you can go in your QGIS settings :
options_qgis

from quickosm.

vinber avatar vinber commented on June 4, 2024

Thanks @Gustry for your help, but for me it works only in command line (LC_NUMERIC="C" /usr/bin/qgis 1> /dev/null 2> /dev/null)

I use QGIS 2.8 and ubuntu 14.04

from quickosm.

Gustry avatar Gustry commented on June 4, 2024

It was working for one day. Now, it's not working anymore. @mdouchin is the screenshot right ?

from quickosm.

rldhont avatar rldhont commented on June 4, 2024

The screenshot is right. It has worked for me. Now I have to use the command line.

It's more a qgis issue, which does not force the LC_NUMERIC for GDAL.

from quickosm.

mdouchin avatar mdouchin commented on June 4, 2024

It still works for me (ubuntu 15.05 fresh install), QGIS 2.12 with options "Overwrite" LC_NUMERIC "C"

from quickosm.

vinber avatar vinber commented on June 4, 2024

Le 28/10/2015 17:28, mdouchin a écrit :

ubuntu 15.05
it's a special version for you :)

I'll try with newer version of ubuntu and qgis

Thanks

Vincent Bergeot Num&Lib - Coop'Alpha

+33 6 95 04 73 98 / http://numetlib.fr

« La route est longue mais la voie est libre ! »

from quickosm.

Gustry avatar Gustry commented on June 4, 2024

This issue has been fixed in GDAL 2.0.

from quickosm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.