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):
combine( combine( wedge_buffer( $geometry, 45, 90, "NE34WR"), wedge_buffer( $geometry, 135, 90, "SE34WR") ), combine( 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:
Screenshot of layer properties:
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?