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

GDAL.gdalwarp fails: Point outside of projection domain #149

Closed
Rapsodia86 opened this issue Mar 6, 2023 · 1 comment
Closed

GDAL.gdalwarp fails: Point outside of projection domain #149

Rapsodia86 opened this issue Mar 6, 2023 · 1 comment

Comments

@Rapsodia86
Copy link

Rapsodia86 commented Mar 6, 2023

UPDATE 2:
I reprojected the file using osgeo gdal.Wrap in python 3.8.13, gdal =3.6.2
And although it showed me the same error: "ERROR 1: Point outside of projection domain", the output was created and looks ok. Any way to have that error suppressed and have the reprojection done?

Using osgeo gdal '3.4.2', python 3.8.13 there is no error but both files have slightly different extents.

UPDATE:
Ok, I think the problem is with the source projection ETRS89-extended / LAEA Europe, the newer GDAL version might have a problem. In R terra, I am getting when reading the data:

proj_create_from_database: prime meridian not found
proj_create_from_database: datum not found
proj_create_from_database: ellipsoid not found

Might be related to: r-spatial/stars#588


Hi there,
I have just updated my packages in Julia and got an error while running gdalwarp.

options22 = GDAL.gdalwarpappoptionsnew(["-co","COMPRESS=LZW","-srcnodata",string(nodata),"-dstnodata",string(nodata),"-t_srs",pr_m, "-of","GTiff","-tr","100","100",pr_m,  "-r", "nearest"], C_NULL)  
ds_warped22 = GDAL.gdalwarp(fn_out22, Ptr{GDAL.GDALDatasetH}(C_NULL), 1, [vpp2], options22, C_NULL)
ERROR: GDALError (CE_Failure, code 1):
        Point outside of projection domain

Stacktrace:
 [1] gdaljl_errorhandler(class::GDAL.CPLErr, errno::Int32, errmsg::Cstring)
   @ GDAL C:\Users\monikat\.julia\packages\GDAL\wjbw2\src\error.jl:36
 [2] gdalwarp(pszDest::String, hDstDS::Ptr{Ptr{Nothing}}, nSrcCount::Int64, pahSrcDS::Vector{Ptr{Nothing}}, psOptions::Ptr{Nothing}, pbUsageError::Ptr{Nothing})
   @ GDAL C:\Users\monikat\.julia\packages\GDAL\wjbw2\src\libgdal.jl:20498
 [3] top-level scope
   @ Untitled-1:55
 pr_m
"PROJCS[\"Pulkovo 1942(58) / Stereo70\",GEOGCS[\"Pulkovo 1942(58)\",DATUM[\"Pulkovo_1942_58\",SPHEROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],AUTHORITY[\"EPSG\",\"6179\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4179\"]],PROJECTION[\"Oblique_Stereographic\"],PARAMETER[\"latitude_of_origin\",46],PARAMETER[\"central_meridian\",25],PARAMETER[\"scale_factor\",0.99975],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",500000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"3844\"]]"
source projection: GDAL.gdalgetprojectionref(vpp2)
"PROJCS[\"ETRS89-extended / LAEA Europe\",GEOGCS[\"ETRS89\",DATUM[\"European_Terrestrial_Reference_System_1989\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Lambert_Azimuthal_Equal_Area\"],PARAMETER[\"latitude_of_center\",52],PARAMETER[\"longitude_of_center\",10],PARAMETER[\"false_easting\",4321000],PARAMETER[\"false_northing\",3210000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"3035\"]]"

Before the update, everything was working fine. now that error. And I do not have the old manifest saved...
However, I found under the old Artifact.toml in GDAL_jll was GDAL-vv300.400.100, the new one is v301.600.200 if that helps...
Previous GDAL was: 1.3.0

Thanks!

Here are the actual packages installed:
Julia v1.7.2
[c9ce4bd3] ArchGDAL v0.9.3
[336ed68f] CSV v0.10.9
[5ae59095] Colors v0.12.10
[717857b8] DSP v0.7.8
[a93c6f00] DataFrames v1.5.0
[31c24e10] Distributions v0.25.86
[add2ef01] GDAL v1.5.1
[c91e804a] Gadfly v1.3.4
[c27321d9] Glob v1.3.0
[cd3eb016] HTTP v1.7.4
[c8e1da08] IterTools v1.4.0
[682c06a0] JSON v0.21.3
[b946abbf] NaNStatistics v0.6.18
[e7bfaba1] NumericalIntegration v0.3.3
[f27b6e38] Polynomials v3.2.5
[438e738f] PyCall v1.95.1
[ce6b1742] RDatasets v0.7.7
[a3a2b9e3] Rasters v0.5.1
[8e980c4a] Shapefile v0.9.1
[2913bbd2] StatsBase v0.33.21
[bd369af6] Tables v1.10.0
[ade2ca70] Dates
[10745b16] Statistics

@Rapsodia86 Rapsodia86 changed the title Point outside of projection domain GDAL.gdalwarp fails: Point outside of projection domain Mar 7, 2023
@visr
Copy link
Member

visr commented Mar 24, 2023

Closing this in favor of yeesian/ArchGDAL.jl#373, since that has a reply.

@visr visr closed this as completed Mar 24, 2023
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