Opened 14 years ago
Closed 13 years ago
#3563 closed enhancement (invalid)
netCDF for western hemisphere
Reported by: | shawngong | Owned by: | Kyle Shannon |
---|---|---|---|
Priority: | normal | Milestone: | 1.8.0 |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | normal | Keywords: | netcdf |
Cc: | warmerdam |
Description
I have sea surface temperature (SST) in netCDF. They display longitudes as >180deg instead of negative values for western hemisphere. I have revised the netCDF driver to correct this problem.
Attachments (2)
Change History (13)
by , 14 years ago
Attachment: | netcdfdataset.cpp added |
---|
comment:1 by , 14 years ago
Type: | defect → enhancement |
---|
by , 14 years ago
comment:2 by , 14 years ago
Cc: | added |
---|---|
Component: | default → GDAL_Raster |
Milestone: | → 1.8.0 |
comment:3 by , 14 years ago
Keywords: | netcdf added; netCDF removed |
---|
comment:4 by , 14 years ago
Shawn, can you tell me what version of gdal you are working with? I took a look at the file you attached, and I think there will be an issue with projected coordinate systems. I will drop it in and test it when you confirm what changes you made. Thanks.
comment:5 by , 14 years ago
Hi Kyle,
Thank you for taking look at this. You are right that changes are on lines 1048-1059.
There used to be another revision that takes care of the y-flip issue (your email mentioned that). But I don't see the problem any more and assume it had been taken care of.
Sorry I don't know how to submit patches instead of the whole file.
Shawn
comment:6 by , 14 years ago
Hi Kyle,
I can confirm that the y-flip issue has been fixed in the release 1.7.1. I last saw in svn-stable-2009.05.14.
So only the above mentioned longitude to be done here.
Shawn
comment:7 by , 14 years ago
Shawn, I am a little hesitant on applying this patch. Your patch does not distinguish between projected and geographic coordinate systems, meaning projected systems would be altered even though they shouldn't. I suspect I can try to handle this with some tests on the file's header. When I implement more writing functionality, I will try my best to comply with CF-1.x convention when writing the file with gdal. It appears that CF uses +/- 180 deg for the most part. I am fairly busy right now, but I will try to apply it with the proper checking soon. Thanks for your patience.
kss
comment:9 by , 14 years ago
Cc: | added; removed |
---|---|
Owner: | changed from | to
I would note that it is acceptable for geographic datasets to represent themselves as being in the range 0 to 360 instead of -180 to 180. I'm a bit nervous about arbitrarily changing this in some drivers. Formally turning the ticket over to Kyle.
comment:10 by , 13 years ago
Status: | new → assigned |
---|
comment:11 by , 13 years ago
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
I agree with Frank's comment above. I think this should be left up to the creator, and not changed arbitrarily by the driver. Closing.
Shawn, could you submit the changes as patches? It is easier for people to see what has been changed and easier to test. Just by searching, I assume the changes are on lines 1048-1059. Are there any other changes? Thanks.