GithubHelp home page GithubHelp logo

etiennesky / gdal-netcdf Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 47.33 MB

clone from svn, with various branches to work on

C# 0.28% PHP 0.24% Prolog 0.01% C++ 65.80% C 19.98% Java 1.45% Rust 0.01% Ruby 0.14% Shell 3.10% Perl 0.08% Visual Basic 0.06% Python 8.88%

gdal-netcdf's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

rkawsar

gdal-netcdf's Issues

Gdal 1.8.1 not setting GeoTransform properly when reading from (new) exported NetCDFs

Just testing and found a back-compatibility issue with current GDAL 1.8.1 code:

(1) exported files using new GDAL NetCDF driver developed here (eg as done during the netcdf_cf tests)
(2) Try to do a gdalinfo on them with gdal 1.8.1, and the GeoTransform isn't detected correctly:

pds@pds-mbp-laptop:~/GIS_Projects/GDAL-NetCDF-Testing/gdal_trans_testing_all_cf1_weld/savedResults/Melb_USGS/refactored_gdal_gtiff$ /usr/local/gdal_1.8.1/bin/gdalinfo melb-small_AEA.nc
Driver: netCDF/Network Common Data Format
Files: melb-small_AEA.nc
Size is 199, 101
Coordinate System is:
PROJCS["GDA94 / Australian Albers",
    GEOGCS["GDA94",
        DATUM["Geocentric_Datum_of_Australia_1994",
            SPHEROID["GRS 1980",6378137,298.2572221010042,
                AUTHORITY["EPSG","7019"]],
            TOWGS84[0,0,0,0,0,0,0],
            AUTHORITY["EPSG","6283"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4283"]],
    PROJECTION["Albers_Conic_Equal_Area"],
    PARAMETER["standard_parallel_1",-18],
    PARAMETER["standard_parallel_2",-36],
    PARAMETER["latitude_of_center",0],
    PARAMETER["longitude_of_center",132],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","3577"]]
Origin = (0.000000000000000,0.000000000000000)
Pixel Size = (-0.000000000000000,0.000000000000000)

Where origin and pixel size should be:
Origin = (1232736.866607666946948,-4118493.958211950026453)
Pixel Size = (30.080459243366306,-30.080459243366494)

Reason why this is happening:

The logic in the old 1.8.1 code inside SetProjection() has a flaw: it first (correctly) reads the GeoTransform from X and Y coordinate variables, but then if the GDAL-added OGC WKT string is added, first looks for 'GeoTransform' string to override the above, and then the 4 corner attributes. And even if the last of these isn't found, it goes ahead and sets blank values.

So I guess there are 2 options:
(1) Update the new code to deal with the issue: and write the "GeoTransform" string whenever WRITE_GDAL_TAGS is enabled;
(2) Publish the back-compat issue, and update the 1.8 driver.

I know it's not ideal, but I slightly favour the former .... to reduce compatibility problems for installed userbase of people using gdal 1.8 and who will want to be able to process files written with the new driver.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.