Closed thom4parisot closed 3 years ago
You're likely running into this - https://github.com/contra/node-gdal-next#breaking-changes
gdal.SpatialReference.fromProj4('+init=epsg:4326')
is not equal to plain EPSG:4326.
EPSG:4326
: lat, lon
fromProj4('+init=epsg:4326')
: lon, lat
If you provide a runnable code sample I can provide more guidance but I can't really see the larger picture from the code provided. I would assume that the file is being parsed as the new EPSG:4326 and all of your other code is using the old fromProj4('+init=epsg:4326')
projection?
Okay, it makes total sense.
I'm opening a Shapefile, projected as WGS84 with ogr2ogr
, and I'm filtering it with a gdal-next
created layer using gdal.SpatialReference.fromProj4('+init=epsg:4326')
as a spatial reference.
I now understand why they are not stricly equal.
Thank you for the pointer 👍
Hello,
I can't wrap my head around this problem:
I'm a bit lost because I would have expected the layers to be projected the same way. I use this test to determine if I need to reproject geometries as I filter them (using
feature.getGeometry().clone().transformTo(wgs84)
).Am I missing something?