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

Running into srs longer than 256 characters #32

Closed
postfalk opened this issue Jul 9, 2015 · 2 comments
Closed

Running into srs longer than 256 characters #32

postfalk opened this issue Jul 9, 2015 · 2 comments

Comments

@postfalk
Copy link

postfalk commented Jul 9, 2015

Using

gdalinfo 2003_01.01.250m_16_days_NDVI.tif

I am getting

PROJCS["SINUSOIDAL Unspecified Datum. Semi-major axis: 6371007.181000, Semi-minor axis: 0.000000",
    GEOGCS["unknown",
        DATUM["unknown",
            SPHEROID["unnamed",6371007.181,0]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Sinusoidal"],
    PARAMETER["longitude_of_center",0],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]

... which has 395 characters with indention removed. The max_length attribute is hard to override because of the abstract model class. Do you have suggestions?

@bkg
Copy link
Owner

bkg commented Jul 10, 2015

Ah, sorry about that, I should have considered the length more carefully. As you mentioned, there is not a straightfoward way to alter this in derived models.

The projcs name here is not standard and could be anything. You can run gdalsrsinfo on your projection to see the proj4 def is +proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371007.181 +b=6371007.181 +units=m +no_defs. Then run gdalsrsinfo on the resulting proj4 def. You can see the WKT representation contains PROJCS["unnamed", so you can use that. Ugh, nevermind, that is still 286 chars.

Instead of CharField with a max length, I think I will transition to TextField here.

@postfalk
Copy link
Author

Ok, thank you very much.
Falk


From: Brian Galey [notifications@github.com]
Sent: Friday, July 10, 2015 12:37 PM
To: bkg/django-spillway
Cc: Falk Schuetzenmeister
Subject: Re: [django-spillway] Running into srs longer than 256 characters (#32)

Ah, sorry about that, I should have considered the length more carefully. As you mentioned, there is not a straightfoward way to alter this in derived models.

The projcs name here is not standard and could be anything. You can run gdalsrsinfo on your projection to see the proj4 def is +proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371007.181 +b=6371007.181 +units=m +no_defs. Then run gdalsrsinfo on the resulting proj4 def. You can see the WKT representation contains PROJCS["unnamed", so you can use that. Ugh, nevermind, that is still 286 chars.

Instead of CharField with a max length, I think I will transition to TextField here.


Reply to this email directly or view it on GitHubhttps://github.com//issues/32#issuecomment-120503840.

@bkg bkg closed this as completed in 7c4e29c Jul 14, 2015
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