Opened 13 years ago
Last modified 9 years ago
#1603 new defect
vector points made from global raster won't display or interplolate across meridian 0
Reported by: | cmbarton | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 6.4.6 |
Component: | Raster | Version: | unspecified |
Keywords: | v.surf.bspline | Cc: | |
CPU: | Unspecified | Platform: | Unspecified |
Description
In GRASS 6.4.3 (and probably 6.4.2), v.surf.bspline won't interpolate the western half of a region centered on the Greenwich meridian (Longitude = 0).
This does work OK in GRASS 7.
Attachments (1)
Change History (6)
follow-up: 3 comment:1 by , 13 years ago
Priority: | normal → major |
---|
comment:2 by , 13 years ago
I've attached a screen shot to show what I'm talking about. There are a batch of points (actually a fully global file) and the interpolation created by v.surf.bspline. Note that it stops at the meridian. This one interpolated the west but not the east. There is no error. I think it may have to do with an inability to read the points across the meridian.
comment:3 by , 13 years ago
Replying to cmbarton:
Hmm. It doesn't work in GRASS 7 either. Also, points don't display across the Greenwich meridian in GRASS 7
It worked yesterday. The only difference is that I just recompiled new versions of both 6.4.3 and 7 today. So it must have broken since 27 February 2012. With the display problem too, this seems like something fairly major. Can someone check to see if they get the same problems?
I can not reproduce the error. For a global dataset in latlon covering -180,180 longitude the full region is interpolated.
Can you provide the full output of v.info of the input vector, r.info of the output raster and g.region of the current region? Thanks!
Markus M
comment:4 by , 13 years ago
Summary: | v.surf.bspline won't interplolate across meridian 0 → vector points made from global raster won't display or interplolate across meridian 0 |
---|
Markus,
I can give some more info on this. I no longer think that it is a problem with v.surf.bspline specifically, but with how vectors (and maybe rasters) are read in a latlon region. I'll described what I did that caused the problem and the work around I discovered.
THE PROBLEM I imported a global raster file (paleoclimate file). It's extents are from s=90S n=90N w=0W e=0E. I used r.to.vect to create a set of points from the center of each grid cell.
Then I created a region with extents s=24N n=90N w=85W e=35E. I wanted to interpolate the points to a higher resolution within this smaller region. Only the portion from 0-35E OR 0-85W was interpolated. But when I displayed the points, only the points from 0-35E OR 0=85W were displayed. So I think that even though I have points both east and west of longitude=0, GRASS will only read them on one side or the other of the central meridian.
THE WORK AROUND After some experimentation, I did made a mask that matched the new region (24-90N and 85W-35E) and use r.mapcalc to create a new raster that was cropped to match this region. Note that there is no problem in displaying or creating a RASTER for this region from the original one.
Then I made a new point-set from the cropped raster. THIS point-set did display correctly in this region and DID interpolate correctly using v.surf.bspline. Note that this new point-set is a geographic subset of the original global point-set but it displays and is read correctly while the portion of the global point-set that lies within the reduced region does not.
So I think the problem is how GRASS is creating and reading the vector points. AFAICT, the points in global set that are located geographically in my region from 85W to 35E look exactly the same coordinate-wise as the points created from the raster cropped to match the region. But somehow they are different.
We need to relabel this ticket, but I'm not sure how best to label it. Maybe you can suggest a better label. Something with a vector library or other library perhaps? I've changed the name of the ticket.
Michael
comment:5 by , 9 years ago
Milestone: | 6.4.3 → 6.4.6 |
---|
Hmm. It doesn't work in GRASS 7 either. Also, points don't display across the Greenwich meridian in GRASS 7
It worked yesterday. The only difference is that I just recompiled new versions of both 6.4.3 and 7 today. So it must have broken since 27 February 2012. With the display problem too, this seems like something fairly major. Can someone check to see if they get the same problems?
Michael