I am having issues performing a geometry by expression operation on a layer I have imported into QGIS. The issue is that the wedge buffers created by the expression I am using are far larger than they should be – I thought the issue was that the units for the layer were in degrees. However, I still have the issue when the units and CRS are changed. I have uploaded to Google Drive (file) the shapefile that is giving me this trouble and the geometry by expression command that I am using.

For background, I am working with NOAA hurricane data that has four directions for wind speed (in miles) and I am attempting to create 4 wedge buffer with the following geometry by expression command (pulled from this Q&A about the same NOAA data https://gis.stackexchange.com/questions/325213/quartiling-a-vector-buffer-in-qgis-3-6):

    wedge_buffer( $geometry, 45, 90, "NE34WR"),
    wedge_buffer( $geometry, 135, 90, "SE34WR")
    wedge_buffer( $geometry, 225, 90, "SW34WR"),
    wedge_buffer( $geometry, 315, 90, "NW34WR")

The output wedge buffer are super-sized – like, bigger than the USA. The buffers are only supposed to extend about 150-300 miles in any given direction but are showing as thousands of miles in size. I want to run this operation such that the output wedge buffers are created in miles. I thought the issue was that the layer’s units are in degrees, meaning the CRS needed to be changed but I am still having issues.

I have attempted to remedy this issue by changing the CRS in the project properties from WGS 84 to WGS 84 / UTM grid system (northern hemisphere) (EPSG:32600). In addition, I changed the layer itself to be in EPSG:32600 – however, even after taking both of those steps the geometry by expression tool still creates these super-sized buffers. See screenshots at end for reference.

Is there something I need to change in the geometry by expression tool to make this happen?

Or am I incorrectly changing the units for this layer?

For reference I have uploaded to Google Drive (see link at beginning) the shapefile I am working with. The relevant fields are NE34WR, SE34WR, SW34WR, and NW34WR.

Screenshot of project properties:

enter image description here

Screenshot of layer properties:

enter image description here

As I mentioned in the comments this layer was originally exported from ArcMap. I have attempted to reproject this geopackage in three different CRS' that I have linked to below to no avail – each time I still get super sized buffers. In hopes of getting advice I have linked to three geopackages I created with different CRS'.

My bottom line question is:

  • Is there another CRS one of you all know of that I could covert to which will not assume degrees for geometry?

For background, I am trying to perform one operation of this project in QGIS because ArcMap is not capable of creating Wedge Buffer shapes, absent some intense Python wizardry. I am happy to troubleshoot the process of exporting this layer in ArcMap as well to see if that makes it automatically load into the right CRS in QGIS. That may be my next step in case I cannot figure out the projecting issues I am now having (described below):

If you would like to look at what I’m seeing, I have three files I tested with unsuccessfully

1) one version of the geopackage file (in EPSG: 4326 WGS 84) is here: https://drive.google.com/file/d/1KNSwf21OyVn6SL7UfsoJb-3b7Zgoijuf/view?usp=sharing.

2) My attempt at a UTM reprojection of it (EPSG:32600 - WGS 84 / UTM grid system (northern hemisphere)) as another geopackage file is here: https://drive.google.com/file/d/1FiZB_ZATtjrPyEZKqHNPol9Kn0IXKfs6/view?usp=sharing).

3) A third attempt with ESRI: 102003 (also in meters) is here: https://drive.google.com/file/d/1cM6eWxGvcMCZR_x2qMAA3HykZwujfkpl/view?usp=sharing).

All three of these geopackages linked to above still give me super sized buffers based on degrees when I run the geometry by expression command mentioned above – I do not know why given that the unit for the last two are in meters.

I am agnostic on what the final CRS is so long as it allow for calculation of distance in miles or meters (which can be accurately converted to miles!) and can safely be projected over the Northern hemisphere.

My struggle right now is with reprojecting the data. I considered simply doing a conversion from degrees to miles or meters in the geometry by expression operation. However, that would introduce some imprecision as I read that the distance between degrees changes depending where on the globe you are (https://academic.brooklyn.cuny.edu/geology/leveson/core/linksa/lat_long.html). Since my NOAA hurricane data spans from the ocean SE of the USA to the ocean in the NE USA, I do not want to do a crude conversion with degrees, unless you all think that there is a conversion factor that would only lead to impression of, say, less than 0.1 miles.

Ideally, it would be great if I could do the reprojection in the geometry by expression tool itself. I took ck’s great suggestion and tried to run the following expression on the first geopackage file I linked to above (in EPSG: 4326 WGS 84)

(transform($geometry, 'EPSG:4326', 'EPSG:32600’))

That did output a reprojected layer – however, it does not show up on the map even when I change the project CRS to 32600. It is like a ghost layer. I tried to export it to a Shape file and load it into Arcmap and received an error saying the SHP file lacked ‘spatial reference information… cannot be projected.’ I have also attempted following the steps for reprojecting explained here under 7.1.3: https://docs.qgis.org/2.8/en/docs/training_manual/vector_analysis/reproject_transform.html

As for the second geopackage file linked to above, the output layer seems to be in the 'EPSG:32600 UTM format,’ with meters shown as units. However, when I run that same geometry expression I get the same super-sized buffers.

Is there another CRS one of you all know of that I could covert to which will not assume degrees for geometry?

  • Welcome to GIS SE! You are sharing the EPSG:4326 shapefile. I cannot export it to EPSG:32600. projinfo EPSG:32600 returns Unsupported conversion method: Transverse Mercator Zoned Grid System. Can you share the GeoPackage instead? I can export the shapefile to other CRS and the buffer size is in the units of the layer, i.e., meters if the CRS unit is meter. – Gabriel De Luca Nov 23 '19 at 23:28
  • Thank you for the welcome - excited to join! I think I did a proper geopackage export here: drive.google.com/drive/folders/…. I also put a ZIP folder with the original SHP file I was working with before I did some CRS edits to it which may have been the issue - perhaps that will work too. For reference I was exporting this stuff from ArcMap - unfortunately, you cannot easily make wedge buffers with ArcMap so I have had to resort to QGIS, which I am unfamiliar with, – silent_cortagrapher Nov 24 '19 at 0:06
  • I will test it. Please edit your question to include the new information. – Gabriel De Luca Nov 24 '19 at 0:38
  • 2
    The third file has an unknown projection for QGIS. It is known that QGIS does not recognize ESRI authority (see gis.stackexchange.com/questions/312100/…). I recommend you import the first file and reproject it in QGIS, to a system that does not deform the distances in that area so much, then create the buffers. If you want to apply the transformation directly in the expression, you must assign the appropriate system to the generated layer. – Gabriel De Luca Nov 25 '19 at 2:21
  • 1
    As per the Tour there should be only one question asked per question. When you say “CRM” in your question body do you mean “GIS”? If not, then what does CRM stand for in this context? – PolyGeo Nov 25 '19 at 12:37

If you use a wedge_buffer in the expression engine, the wedge will always be scaled like your original data, in your case in 4326. You can use something like a scaling factor for latitude/longitude values. The expression then would be like:

 wedge_buffer( $geometry, 135, 90, 0.001* "SW34WR")

enter image description here

  • 3
    You can re-project data inside the geometry generator, using either the translate or transform function (I forget which and I don't have qgis open at the moment to check; just search for "trans" in the expression builder help and read the descriptions). Wrap the $geometry term inside that function, like this: transwhatever($geometry, 'EPSG:43261,'EPSG:32600') – csk Nov 24 '19 at 17:59
  • Thank you - I have edited to post to respond to your suggestion. – silent_cortagrapher Nov 25 '19 at 1:41

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