Open howff opened 2 weeks ago
Yes this is expected - currently must be in the same projection as the raster. Happy to receive a pull request to address this if you think this is necessary.
Having said that, one of the benefits of tuiview IMHO is that you see the data actually as it is and without any transformation. I like that any mismatch shows up when I view it and before it causes any problems for downstream processing... I never know what to trust in QGIS. Is there any downside to running ogr2ogr
first? Anyway, appreciate any thoughts you have.
Thanks for the explanation. I can see the pros and cons of both approaches. In the case of vectors I think it might be more intuitive to plot the vector using the projection of the visible rasters, but that's only from my perspective of trying to overlay things like coastlines, rivers, POIs, on top of images.
The main problem with the current approach is that GeoJSON files don't have a projection, they are assumed to be lat lon WGS84 degrees, so they will never be plotted correctly. Transforming the coordinates in the GeoJSON manually to the raster's projection is possible but non-standard as the coordinates will be in metres in an undefined (as far as the geojson file is concerned) projection.
I see what you are saying, although amusingly I was given a geojson this week in EPSG:4269, so it does happen.
How do you feel about a test that when a vector is opened and the projection for that vector differs from that for the rasters (ie not SpatialReference.IsSame) the user is asked whether they want to reproject the vector to match? And if so, a reprojection happens to each feature as it is reading (in vectorrasterizer.c). This shouldn't be too hard, although I might not get to this for a while. If you like, make a start on a PR and I can add to it.
When I load a Vector file in
.shp
format and select the (only) named layer there is nothing rendered in the display, when I've got other GeoTIFFs loaded. It seems to display when it is loaded by itself but in a very poor map projection. When I load it on top of a GeoTIFF, as a coastline overlay, then it is not visible.It seems that I have to manually reproject the shapefile into the same projection as the GeoTIFF, is this expected?
(I thought other software would handle this automatically)