Comments (4)
The main issue when you pass in an array of only z values is that you'd lose all the information about location. So the bbox
actually defines locations for you, that's why instead of clipping the original DEM with the given bbox, you actually get the stretched/shrunk version of the same original elevations. The issue with the inversion is related to how data is stored vs plotted when you lose the location info. Your first row of data in the matrix starts from the top. In the plot, your first row of pixels starts from the bottom, and it looks like that's what you see here.
I haven't looked at the DEM
code in oceanmesh
, I've recently started looking into using this package. So please don't take what I said as given!
from oceanmesh.
Hi there. Thank you for flagging this! I think I was the one who initially implemented the input of an array/callable function for DEM
. It's more or less what was said above in relation to needing to prescribe bbox
: by giving an array, you need some information about the positioning. The tuple bbox
is required as it defines the positional data. For the input of numpy data, there is also a supposition of how that data is given. It could be that a np.rot90
is needed just after line 676 of geodata.py
. I can look into this Wednesday evening. If I understand correctly, you do have a fix for the time-being?
from oceanmesh.
From memory, DEM class takes a tif or netcdf file and reads it in as you show.
I would avoid passing arrays with no meta data.
Sometimes the NetCdf/tif file is packed using a different convention than is expected by the software. What I recall is that the origin is either at the top left or bottom left of the DEM.
In any case, this aspect of the software should be improved and standardized.
from oceanmesh.
Hi @filippogiaroli I have finally found some time to improve this issue. I will merge the branch referenced above shortly but if you want you can use that branch now. Please let me know if you run into any issues with reading or processing your DEM with that branch if you try it. Thanks.
from oceanmesh.
Related Issues (20)
- Refactor geodata HOT 1
- Off-by-one error reading Etopo1 data HOT 4
- Handle non-square meshing domains
- depth-based bound enforcement
- Update CI system
- implement geolayer
- Slack link no longer active HOT 1
- remove low valency elements
- Wavelength_sizing_function Error HOT 3
- Fix Mesh: Too many values to unpack
- Mesh resolution expanding from a point
- Support for reading in xy files HOT 1
- Question: How the meshgen works HOT 4
- River meshing HOT 5
- Fix CI build system
- Problem with distance_sizing_function
- Implement CFL condition based on group velocity
- ESPG=4326 is not recognised HOT 3
- offset in sizing functions using dem (WL and bathy gradient) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oceanmesh.