0

I am new to spatial analysis, QGIS & CRSs and seek help with coordinate conversions. I have been told that this is an "easy" process in QGIS but when I tried it, I received the following error:

Export to vector file failed. Error: Creation of layer failed (OGR error: Failed to create file M1.shp: Read-only file system)

I googled this error and I couldn't find anything other than a pdf table containing loads of different QGIS errors.

The steps I followed were:

Import a CVS file (see data below) into QGIS as a text delimited layer with Geometry Definition: Point coordinates and the default Geometry CRS: EPSG:4326-WGS 84

Plot ID   X_meters   Y_meters
M1   0.0  364051.75  4109976.75 (plot centre) 
M1   1.1  363997     4109947    (corner) 
M1   1.2  364078     4109926    (corner) 
M1   1.3  364110     4110007    (corner) 
M1   1.4  364022     4110027    (corner)

2.Once the points were loaded and visible in QGIS, I used Export features as CRS EPSG:4326-WGS 84 with Geometry type: Automatic (I also tried selecting Point)

How do I do this correctly?

What I am trying to do is convert plot coordinates for some forest plots which were collected in Chile, South America with a regular GPS in a format that I have never seen before: X_meters/Y_meters to match the coordinates of the plots collected with a differential GPS: X_decimals/Y_decimals (first time working with this format also). All my google searches have produced results for converting coordinates from decimals to UTM or other formats and I have not been able to understand the couple of links I've seen for meter to decimal conversions.

I also have the target projection information for the plot coordinates collected with the differential GPS:

S_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

I have looked at the different CRSs in QGIS but none seem to match the above. If it helps, I also have both decimal and meter coordinates for the corners of one of the plots but I have no idea how the conversion was done:

Plot ID X_decimal Y_decimal X_meters Y_meters
S1 1.1 -72.09774 -39.604084 749181 5612159
S1 1.2 -72.098203 -39.603312 749144 5612246
S1 1.3 -72.096857 -39.603774 749258 5612191
S1 1.4 -72.097334 -39.60293 749220 5612286
0

1 Answer 1

2

It's SIRGAS-Chile 2016 / UTM Zone 18S (EPSG:9154).

There are a few projections used in Chile:

Transforming the WGS84 coordinates to EPSG:9154 matches the metres in your example. I used a Python script, I wrote a while ago, for testing which you can find below:

import pyproj
from shapely.ops import transform
from shapely.geometry import Point

x = -72.09774
y = -39.604084

wgs84 = pyproj.CRS("EPSG:4326")
utm = pyproj.CRS("EPSG:9154")

project = pyproj.Transformer.from_crs(wgs84, utm, always_xy=True).transform
point = transform(project, Point(x, y))

print(point)

The script output is:

POINT (749181.0271899529 5612159.049921682)

I hope it brings you a step closer to the solution.


If you have some Python know-how, you could start with this script:

import pyproj
from shapely.ops import transform
from shapely.geometry import Point

# your coordinates to transform
coordinates = [
    (364051.75, 4109976.75),
    (363997, 4109947),
    (364078, 4109926),
    (364110, 4110007),
    (364022, 4110027),
]

wgs84 = pyproj.CRS("EPSG:4326")
utm = pyproj.CRS("EPSG:9154")

project = pyproj.Transformer.from_crs(utm, wgs84, always_xy=True).transform

for coordinate in coordinates:
    point = transform(project, Point(coordinate[0], coordinate[1]))
    print(point)

Result:

POINT (-77.03254620311505 -53.14223787917329)
POINT (-77.03337682686404 -53.14249117030619)
POINT (-77.03217553963761 -53.14270049028919)
POINT (-77.03166308520815 -53.14198098282608)
POINT (-77.03296936238479 -53.14177886570875)

Or you could use QGIS: Depending on your data format, you also just can add the data as a layer in QGIS and then right click on the layer, and with Save as ... you can save a new file using EPSG:9154.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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