0

This is absolutely doing my head in...

I am trying to load buffers that are generated in QGIS 3.4 from OpenStreetMap data (via Overpass) onto a map powered by Leaflet.

When I load them into my map, the buffers that should be perfect circles show up like this:

enter image description here

What I have tried

I have read up on the projections that Mapbox, Leaflet and Geojson support (seems that it's either EPSG: 4326 or EPSG:4326).

As a result, I have saved my original point files from OpenStreetMap as both projections and generated buffers in QGIS from both projections. Both come up with the same result as above, even with changing the project CRS between the two.

The weirdest thing is that the points are in exactly the spot they should be and show up as perfect circles in QGIS.

First few lines of the Geojson file:

  var fivekmbuffersupermarkets = {
  "type": "FeatureCollection",
  "name": "5kmbuffersupermarkets4326",
  "crs": {
    "type": "name",
    "properties": {
      "name": "urn:ogc:def:crs:OGC:1.3:CRS84"
    }
  },

Geojson file code here: https://jsfiddle.net/65fzujk3/

6
  • What projection are you using in qgis when creating the buffer? Commented Aug 3, 2020 at 11:00
  • That looks correct for a circular buffer on top of OSM in EPSG:3857 - you should reproject to a local projection in metres and calculate buffers there and then reproject the output to the required projection
    – Ian Turton
    Commented Aug 3, 2020 at 15:38
  • @IvanSanchez I've tried a local projection (GDA2020/VicGrid), EPSG: 4326 and EPSG: 3857. All with the same result.
    – tarantella
    Commented Aug 3, 2020 at 22:47
  • @IanTurton Thanks for the suggestion, still comes up with the same result. I've noticed that the coordinates in files with all three projections are exactly the same, if that helps?
    – tarantella
    Commented Aug 3, 2020 at 22:50
  • 1
    The projection in qgis is that of the data, not the one of the viewport. See gis.stackexchange.com/questions/320955/… Commented Aug 3, 2020 at 23:37

1 Answer 1

0

Was contacted by someone else who got this working for me. Never worked out exactly what I was doing wrong but these steps worked for me with the Geojson file linked above:

  1. Add layer

  2. Vector > Data Management Tools > Reproject Layer > 28355

  3. Vector > Geoprocessing Tools > Buffer > 5000m, 8 segments

  4. Vector > Geoprocessing Tools > Dissolve

  5. Vector > Data Management Tools > Reproject Layer > 4326

Never touched the Project CRS at all.

Not the answer you're looking for? Browse other questions tagged or ask your own question.