Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spatial reference transformation issue with the new cross-section plot class #660

Closed
flydream0428 opened this issue Oct 3, 2019 · 3 comments
Assignees

Comments

@flydream0428
Copy link

flydream0428 commented Oct 3, 2019

The new cross-section class doesn't do spatial transformation even when the spatial reference information has been configured through DIS and modelgrid class.
For example, let's say I have loaded a model mf, then I configure the spatial reference,

mf.modelgrid.set_coord_info(xoff=xoff, yoff=yoff, angrot=0)

Then, I do the plot,
flopy.plot.PlotCrossSection(model=mf, line=line={'Row': 10})

The cross-section plot still starts from 0 rather than xoff.

@jlarsen-usgs jlarsen-usgs self-assigned this Oct 3, 2019
@jlarsen-usgs
Copy link
Contributor

@flydream0428, I'll take a look at this issue.

@jlarsen-usgs
Copy link
Contributor

The issue in the plotting code. Currently the plotting code is translating the modelgrid to model coordinates (i.e. xoffset=0, yoffset=0, and angrot=0). I'm working on a patch for this and will submit a PR to translate the cross sections back to geographic coordinates.

@jlarsen-usgs
Copy link
Contributor

@flydream0428, I've added a new feature to the PlotCrossSection class that allows the user to plot in geographic coordinates. The default behavior was, and still is, to plot cross sections with the cross sectional distance on the x-axis. This behavior is useful for arbitrary cross sections, because the code does not have to choose a projection direction to display the data from.

To plot using geographic coordinates you can use

pxc = PlotCrossSection(model=mf, line={"column": 10}, geographic_coords=True)

Examples can be found in the flopy3_PlotCrossSection_demo.ipynb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants