Opened 8 years ago
Last modified 5 years ago
#6251 closed defect
gdal_proximity.py gives wrong distance — at Version 4
Reported by: | remilemoy | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | closed_because_of_github_migration |
Component: | default | Version: | 1.11.0 |
Severity: | normal | Keywords: | proximity |
Cc: |
Description (last modified by )
When computing distances between all points of a raster and a given pixel (the center of a city in a monocentric city model) using gdal_proximity.py, I obtained wrong distances. The error is not big, but not very small either, something like 5 or 10% (500-900m for 10km), depends on the CRS I used (I tried another one because I thought it was CRS-related) and is bigger in a North-South direction than East-West.
I saw the error when I computed the distance in another way (euclidian distance using the projected coordinates). I am confident that this euclidian distance is right because I compared it to the one given by an online national GIS system (http://www.geoportail.gouv.fr -- I was working on a French city), and the distances I measured were in good agreement (and it worked for both CRSs I tried).
So I will just stop using gdal_proximity, also because I don't really need it in this project, but I wanted to mention the error -- I hope that this is the right place to do so.
Sorry if it is actually my mistake, I am still a beginner with GIS!
Best,
Rémi
Change History (4)
comment:1 by , 8 years ago
follow-up: 3 comment:2 by , 8 years ago
Also note that if your raster is georeferenced in a geographic coordinate system (long/lat), -distunits GEO will compute distance in "degrees". So you might want to project in a projected coordinate system first.
comment:3 by , 8 years ago
Hello, yes I used this "-distunits GEO", and I was working in a projected coordinate system (I even tried 2 of them), with coordinates in meters.
comment:4 by , 8 years ago
Description: | modified (diff) |
---|
Did you use the "-distunits GEO" switch ? Quoting http://gdal.org/gdal_proximity.html