I wonder if GDAL shouldn't suggest sorting as a means of fixing the issue,
possibly with Mark's command?
On Sep 11, 2017 7:32 AM, "Andreas Neumann" wrote:
> Hi Mark (and others),
>
> Your sort command worked like a charm. It was also very fast!
>
> Now gdalinfo produces this nice information out
Hi Joaquim,
Interesting. Thanks for sharing. As always with OpenSource there are
more solutions than just one ;-)
Yes, I am aware about the missing data in the lower right corner - this
is outside of the province and outside of my area of interest.
Thanks and greetings,
Andreas
On 11.09.
Yes - I am aware of gdal_translate and gdalwarp to translate formats.
Thanks a lot. I am very happy that this was so easy to solve and now I
can use this data in QGIS.
I think the data provider just concatenated chunks of existing files and
did not care about the order. I will ask them to run
You could have done it with GMT as well
gmtinfo DTM_swissALTI3D_XYZ.txt -I2
-R2708001/2717999/1210001/121
xyz2grd -R2708001/2717999/1210001/121 -I2 -GDTM_swissALTI3D_XYZ.grd
DTM_swissALTI3D_XYZ.txt
and you get a netCDF grid (it can do GeoTIFs too but would need to go see
the docs)
This will do the same, just replace the EPSG code number:
gdal_translate -ot Float32 -a_srs EPSG:25833 ../xyz/390_5820.dhhn92.txt
../2007.390_5820.dhhn92.25833.tif
Mark
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/l
Hi Mark (and others),
Your sort command worked like a charm. It was also very fast!
Now gdalinfo produces this nice information output:
Driver: XYZ/ASCII Gridded XYZ
Files: dtmav_sorted.xyz
Size is 5000, 5000
Coordinate System is `'
Origin = (2708000.000,121.000)
Pix
You must sort the data beforehand
- the y position must be sorted properly (ASC or DESC)
Standard linux sort program:
sort -k2 -n -k1 392_5810.xyz -o 392_5810.sort.xyz
(2nd column (y) as numeric, then first column (x) -o = output file
As a zip file you can also do:
unzip -p 390_5820.zip | sort
On lundi 11 septembre 2017 15:43:47 CEST Andreas Neumann wrote:
> Hi,
>
> I received a DTM from a Swiss province (OpenData) which is of the
> following format:
>
> One coordinate per line, already gridded. See f.e.
>
> 2708001.00 1218001.00 1541.52
> 2708003.00 1218001.00 1542.35
> 2708005.00 12
Can you transform the file and swap the y & x when they are in an
alternative order with your choice of python/perl/awk?
On Mon, Sep 11, 2017 at 6:51 AM, Andreas Neumann
wrote:
> Hi,
>
> Forgot to mention the link to the file, just in case you have time testing
> - see https://services.geo.zg.ch
Hi,
Forgot to mention the link to the file, just in case you have time
testing - see https://services.geo.zg.ch/temp/dtmav.zip (138 MB zipped
file).
Thanks,
Andreas
On 11.09.2017 15:43, Andreas Neumann wrote:
Hi,
I received a DTM from a Swiss province (OpenData) which is of the
followin
Hi,
I received a DTM from a Swiss province (OpenData) which is of the
following format:
One coordinate per line, already gridded. See f.e.
2708001.00 1218001.00 1541.52
2708003.00 1218001.00 1542.35
2708005.00 1218001.00 1542.98
2708007.00 1218001.00 1543.58
2708009.00 1218001.00 1544.20
2708
11 matches
Mail list logo