[gdal-dev] gdal_translate, exporting "Byte - Eight bit unsigned integer" single band tiff to gpkg using -ot Byte results in 4 bands raster with changed values

2020-12-02 Thread Nicolas Cadieux
similar on a Mac running QGIS 3.10.1-A with GDAL 3.0.2 and QGIS3.16 on Windows running GDAL 3.1.4. Test files are found here: https://drive.google.com/drive/folders/1fMl9odowUFFRQFK61rTxgHeom_D8ymN6?usp=sharing Thanks! Nicolas Nicolas Cadieux https://gitlab.com/njacadieux __

Re: [gdal-dev] GetProjection returns empty string, python 3.7

2020-10-26 Thread Nicolas Cadieux
SpatialReference() srs.SetUTM(11, 1) srs.SetWellKnownGeogCS("NAD27") dst_ds.SetSpatialRef(srs) " ?? On Mon, 26 Oct 2020 at 22:11, Nicolas Cadieux mailto:njacadieux.git...@gmail.com>> wrote: Hi, Comes back as None for me... :(  I'am working with Anaconda.  Cou

Re: [gdal-dev] GetProjection returns empty string, python 3.7

2020-10-26 Thread Nicolas Cadieux
sr.SpatialReference() srs.SetUTM(11, 1) srs.SetWellKnownGeogCS("NAD27") dst_ds.SetSpatialRef(srs) " ?? On Mon, 26 Oct 2020 at 22:11, Nicolas Cadieux mailto:njacadieux.git...@gmail.com>> wrote: Hi, Comes back as None for me... :(  I'am working with Anaconda.  Could it be my envi

Re: [gdal-dev] GetProjection returns empty string, python 3.7

2020-10-26 Thread Nicolas Cadieux
        if crs:                 proj = crs.GetName()             return {"type": "gdal", "driver": dataset.GetDriver().ShortName, "proj": proj} On Mon, 26 Oct 2020 at 20:08, Nicolas Cadieux mailto:njacadieux.git...@gmail.com>> wrote: Hi, Tha

Re: [gdal-dev] GetProjection returns empty string, python 3.7

2020-10-26 Thread Nicolas Cadieux
On 2020-10-26 3:44 p.m., Paul Harwood wrote: I am not sure why you are using GetProjection and not GetSpatialRef ? Although, the code snippet you included in your email does not seem to use either? I certainly was in the process of working on some code that uses .GeoSptialRef very success

Re: [gdal-dev] GetProjection returns empty string, python 3.7

2020-10-26 Thread Nicolas Cadieux
New info! GetProjection works with gdal python 2.2.2 and 2.3.3 but not with with gdal 3.0.2.  Is this a change in the gdal library? Nicolas On 2020-10-26 1:53 p.m., Nicolas Cadieux wrote: Hi, In case mail question was not clear, I have posted the questions about this on stackexchange.  I

Re: [gdal-dev] GetProjection returns empty string, python 3.7

2020-10-26 Thread Nicolas Cadieux
-getprojection On 2020-10-25 9:31 p.m., Nicolas Cadieux wrote: Hi, With the following code, I get an empty string indicating the projection is not valid. from osgeo import gdal, osr raster_ds = gdal.Open(r"C:\temp\180922_WTE3.tif") target_ds = driver.Create(r"c:\temp\output.tif",

[gdal-dev] GetProjection returns empty string, python 3.7

2020-10-25 Thread Nicolas Cadieux
Hi, With the following code, I get an empty string indicating the projection is not valid. from osgeo import gdal, osr raster_ds = gdal.Open(r"C:\temp\180922_WTE3.tif") target_ds = driver.Create(r"c:\temp\output.tif",xsize=raster_ds_ncol,ysize=raster_ds_nrow,bands = 1,eType = gdal.GDT_Float3

Re: [gdal-dev] Coordinate space to pixel space with image rotation in python

2020-10-16 Thread Nicolas Cadieux
On 2020-10-16 11:49 a.m., Nicolas Cadieux wrote: Hi again! (a few months later...) What is the best practice for reading a single pixel in the raster? structval = raster_band.ReadRaster(column, row, 1, 1, 1, 1, raster_band.DataType) or structval = raster_band.ReadRaster(int(column), int

[gdal-dev] Coordinate space to pixel space with image rotation in python

2020-01-28 Thread Nicolas Cadieux
tween geo_transform[2] and geo_transform[4]? Thanks in advance! Nicolas Cadieux ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Wkt single precision float point

2019-08-04 Thread Nicolas Cadieux
>> On dimanche 4 août 2019 13:18:12 CEST Nicolas Cadieux wrote: >> Hi, >> >> I’am I wrong or is the WKT format only a single precision float point? Is >> there a standard that imposes this? Could this be changed to a double >> precision float point or must I use

[gdal-dev] Wkt single precision float point

2019-08-04 Thread Nicolas Cadieux
Hi, I’am I wrong or is the WKT format only a single precision float point? Is there a standard that imposes this? Could this be changed to a double precision float point or must I use GJSON for that? Thanks! Nicolas ___ gdal-dev mailing list gdal-de

Re: [gdal-dev] Ellipsoidal length of a line

2019-06-15 Thread Nicolas Cadieux
t; entry of the PROJ API - cf. > https://proj.org/development/reference/functions.html > > (and probably you should continue this thread on the PROJ mailing list if you > need additional assistance) > > /Thomas > >> Den lør. 15. jun. 2019 kl. 06.43 skrev Nicolas Cadieux >

Re: [gdal-dev] Ellipsoidal length of a line

2019-06-14 Thread Nicolas Cadieux
; - >> Atle Frenvik Sveen >> a...@frenviksveen.net >> 45278689 >> atlefren.net >> >> On Fri, Jun 14, 2019, at 17:32, Nicolas Cadieux wrote: >> > Hi, >> > >> > I am trying to get the length of a line in python. (Not just the >&

Re: [gdal-dev] Ellipsoidal length of a line

2019-06-14 Thread Nicolas Cadieux
nviksveen.net > 45278689 > atlefren.net > >> On Fri, Jun 14, 2019, at 17:32, Nicolas Cadieux wrote: >> Hi, >> >> I am trying to get the length of a line in python. (Not just the >> straight length between the first and last nodes). Using geopandas,

[gdal-dev] Ellipsoidal length of a line

2019-06-14 Thread Nicolas Cadieux
Hi, I am trying to get the length of a line in python. (Not just the straight length between the first and last nodes). Using geopandas, (therefore the Shapely lib) I am getting the euclidien distance even though the dataframe holdings the line geometries has a CRS (WGS84, zone UTM 18 S). Obv

Re: [gdal-dev] Gdal_fusion.py???

2019-04-05 Thread Nicolas Cadieux
GIS 2nd Edition: > * > https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition > * Hire me: http://goo.gl/BYRQKg > ********** > > >> On Fri, 5 Apr 20

[gdal-dev] Gdal_fusion.py???

2019-04-05 Thread Nicolas Cadieux
Hi, I have made a python 2.7 / 3.7 program to fuse a point cloud with hyperspectral images. The end result is a text file with xyz... from the cloud file followed by the band pixel values. It’s all multithreaded so a cloud with 6.5 million points can be fused with a raster with 288 band in 45

Re: [gdal-dev] ReadRaster memory hit

2019-03-27 Thread Nicolas Cadieux
or to loop the thousands of points one band at a time inside this function? “ > Le 12 mars 2019 à 08:49, Nicolas Cadieux a > écrit : > > Would it be a better approach to loop through the 200 bands inside this > function? So basically, is it faster to loop the 200 bands

Re: [gdal-dev] ReadRaster memory hit

2019-03-12 Thread Nicolas Cadieux
faster to loop the 200 bands or to loop the thousands of points one band at a time inside this function? Merci, Your wisdom and help is always appreciated! Nicolas > Le 12 mars 2019 à 07:58, Even Rouault a écrit : > >> On mardi 12 mars 2019 01:56:34 CET Nicolas Cadieux wrote: >

[gdal-dev] ReadRaster memory hit

2019-03-11 Thread Nicolas Cadieux
Hi, I am writing a python script and I need to read certain pixels form a huge Hyperspectral images with over 200 band. If I use the method below from the tutorial, if I understand correctly, memory hits will only come from what I place in the buffer? In this case, only one line of pixels?

[gdal-dev] Zonal Grid Statistics

2018-12-17 Thread Nicolas Cadieux
Hi, I am currently using the SAGA Zonal Grid Statistics found here: http://www.saga-gis.org/saga_tool_doc/7.0.0/statistics_grid_5.html (both Zonal and Continuous Data are Rasters with the same extent and pixel posting). It works well but SAGA load both grids into memory.  Since my grids are t

[gdal-dev] Lost in decimals... geotransform in python 2.7

2018-12-09 Thread Nicolas Cadieux
Hi, I am trying to get the four corners of a raster the size of Canada (very big therefore decimals count).  If I get the geotransform, I get: geotransform: (-132.000417, 0.0008334, 0.0, 53.0004166, 0.0, -0.0008334) In Python 2.7: print (geotransform[0

[gdal-dev] Introduction to the python API

2018-11-05 Thread Nicolas Cadieux
Hi, I am a self-taught python programmer trying to get a handle on the latest Python GDAL api.  I use the Cookbook (https://pcjericks.github.io/py-gdalogr-cookbook/index.html) but I am not sure it's up to date (version 1x???).  What books, sites or cookbooks do you recommend that would help m

[gdal-dev] Suggestion to create drivers for a new raster format

2018-08-31 Thread Nicolas Cadieux
Hi, How do we proceed if we want GDAL team to create drivers for a new raster format? I would like gdal to be able to read .byn and .bin Geoid files. I don’t think these files can be simply read using the bin vrt format. I have the file format specifications. Nicolas Cadieux

[gdal-dev] Reading raw bin raster. Need help with .vrt please.

2018-08-08 Thread Nicolas Cadieux
uot;1">s01w072_slope.bin             ?         Thanks in advance. Nicolas Cadieux ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] help printing the standard out from gdal_grid in python

2018-04-12 Thread Nicolas Cadieux
Hi, I am not an experienced programmer.  I am calling gdal_grid from a python script.  I am using p.imap_ unordered to multiprocess the script.  The idea is the following: def gdal_Grid(fileList):     gdal_Grid_Cmd = 'gdal_grid -l '     shell = subprocess.Popen(r'c:\

[gdal-dev] Resampling rasters with search radius

2018-02-22 Thread Nicolas Cadieux
Hi, I am creating rasters with Lidar data using GDAL grid. I have very large datasets. This raster has 1m pixels. For now, I am using nearest neighbours with a 1x1 m. radius. This is fast. My goal is then to make 4 rasters all having the same 30 m pixel posting but I want these new rasters

Re: [gdal-dev] Merge many raster using maximum value where overlaps

2017-11-20 Thread Nicolas Cadieux
Hi, You may be able to do that with the Saga grid mosaic. You can select ´max’ for overlapping areas. http://www.saga-gis.org/saga_tool_doc/2.3.0/grid_tools_3.html Nicolas > Le 17 nov. 2017 à 15:05, Rousseau Lambert2, Louis-Philippe (EC) > a écrit : > > Hi everyone, > > I would like to

Re: [gdal-dev] Question: making a raster - gdal_rasterize directly from Geodatabase file

2016-11-27 Thread Nicolas Cadieux
Hi, If you go from a vector to a raster format, you will loose all the information. Best to save to SpatialLite database. It a single file. > Le 27 nov. 2016 à 08:06, Kevin a écrit : > > I wish to make a raster directly from a very large ESRI Geodatabase (GDB) > file. > > The layer (State_

Re: [gdal-dev] Reading DNC nautical charts

2015-11-21 Thread Nicolas Cadieux
interface. Nicolas Cadieux M.Sc. Les Entreprises Archéotec inc.  8548, rue Saint-Denis Montréal H2P 2H2 Téléphone: 514.381.5112  Fax: 514.381.4995 www.archeotec.ca On Nov 20, 2015 4:13 PM, Hans Rijsdijk wrote: > > Can anyone advise if DNC nautical charts can be used on the gdal software > a

Re: [gdal-dev] using gdal on ironpython 2.7

2015-10-27 Thread Nicolas Cadieux
commands will run one after the other in a command prompt.  This file can be created in with python running a loop in a directory. I can send you an example if you want (python2.7). Not sure about the rest. Nicolas Cadieux M.Sc. Les Entreprises Archéotec inc.  8548, rue Saint-Denis Montréal H2P 2H2

Re: [gdal-dev] gdal_rasterize in multiple processes

2015-07-16 Thread Nicolas Cadieux
, the computer needs to wait. The hard drive speed or memory band width are typical bottle necks that can slow down a very fast machine to a trickle if they get saturated. Nicolas Cadieux M.Sc. Les Entreprises Archéotec inc.  8548, rue Saint-Denis Montréal H2P 2H2 Téléphone: 514.381.5112  Fax

Re: [gdal-dev] gdal_rasterize increase memory usage

2015-07-16 Thread Nicolas Cadieux
uffer size is arbitrary and what may be good for one person may cause problems to another if, for example, a person launches many instances of the same program in parallel. Best to recompile if the option is there. There is a page on the gdal web site explaining how to do it. Good luck Nicol

Re: [gdal-dev] Accelerate Raster Calculation

2015-07-08 Thread Nicolas Cadieux
, I would liked to be kept informed on this conversation as my data will soon get much larger. Thanks! Nicolas Cadieux M.Sc. Les Entreprises Archéotec inc.  8548, rue Saint-Denis Montréal H2P 2H2 Téléphone: 514.381.5112  Fax: 514.381.4995 www.archeotec.ca On Jul 8, 2015 9:13 AM, Yuta Sato wrote:Dear

Re: [gdal-dev] Clipping Task, pl. help!

2015-07-02 Thread Nicolas Cadieux
Hi, See the -cutline option in gdal warp. http://www.gdal.org/gdalwarp.html Nicolas Cadieux M.Sc. Les Entreprises Archéotec inc.  8548, rue Saint-Denis Montréal H2P 2H2 Téléphone: 514.381.5112  Fax: 514.381.4995 www.archeotec.ca On Jul 3, 2015 00:15, user gdal wrote:Dear friends I have an ERDAS

Re: [gdal-dev] Is there a gdalwarp command to turn 'internal nodata values' into nodata (and read as transparent by arcmap)?

2015-06-29 Thread Nicolas Cadieux
nodata values will be copied from the source dataset (GDAL>=1.11) Nicolas Cadieux M.Sc. Les Entreprises Archéotec inc.  8548, rue Saint-Denis Montréal H2P 2H2 Téléphone: 514.381.5112  Fax: 514.381.4995 www.archeotec.ca On Jun 29, 2015 19:14, Ruth Simm wrote:Interesting.I am using GDAL 1.9.1 - s

Re: [gdal-dev] Is there a gdalwarp command to turn 'internal nodata values' into nodata (and read as transparent by arcmap)?

2015-06-28 Thread Nicolas Cadieux
-dstnodata value [value...]: http://www.gdal.org/gdalwarp.html Nicolas Cadieux M.Sc. Les Entreprises Archéotec inc.  8548, rue Saint-Denis Montréal H2P 2H2 Téléphone: 514.381.5112  Fax: 514.381.4995 www.archeotec.ca On Jun 26, 2015 7:20 PM, Ruth Simm wrote:Using this:>> dtm>gdalwarp -s

Re: [gdal-dev] Is there a gdalwarp command to turn 'internal nodata values' into nodata (and read as transparent by arcmap)?

2015-06-26 Thread Nicolas Cadieux
Hi Use gdal warp. Nicolas Cadieux M.Sc. Les Entreprises Archéotec inc.  8548, rue Saint-Denis Montréal H2P 2H2 Téléphone: 514.381.5112  Fax: 514.381.4995 www.archeotec.ca On Jun 26, 2015 19:20, Ruth Simm wrote:Using this:>> dtm>gdalwarp -s_srs EPSG:4326 -t_srs EPSG:3857 -r bil

Re: [gdal-dev] Gdal-Grid lidar.

2015-06-18 Thread Nicolas Cadieux
the new linear interpolation. Nicolas Nicolas Cadieux M.Sc. Les Entreprises Archéotec inc.  8548, rue Saint-Denis Montréal H2P 2H2 Téléphone: 514.381.5112  Fax: 514.381.4995 www.archeotec.ca On Jun 18, 2015 11:43, Even Rouault wrote: > > Le mardi 16 juin 2015 19:00:45, Even Rouault a

Re: [gdal-dev] Gdal-Grid lidar.

2015-06-16 Thread Nicolas Cadieux
er, the .tiff is not encoded efficiently and that this is fixed when the file is pass through gdalwarp? Nicolas Cadieux M.Sc. Les Entreprises Archéotec inc.  8548, rue Saint-Denis Montréal H2P 2H2 Téléphone: 514.381.5112  Fax: 514.381.4995 www.archeotec.ca On Jun 15, 2015 15:24, Even Rouault wr

Re: [gdal-dev] Gdal-Grid lidar.

2015-06-15 Thread Nicolas Cadieux
file size and the buffer or can I simply select a 2GB buffer? Merci beaucoup pour votre aide. Nicolas Cadieux M.Sc. Les Entreprises Archéotec inc.  8548, rue Saint-Denis Montréal H2P 2H2 Téléphone: 514.381.5112  Fax: 514.381.4995 www.archeotec.ca On Jun 12, 2015 17:29, Even Rouault wrote: > &

Re: [gdal-dev] Gdal-Grid lidar.

2015-06-12 Thread Nicolas Cadieux
;. I will use warp and the raster calculator in the future so you have more magic up your sleeve, I would appreciate it. Cheers and thanks again. Nicolas Cadieux M.Sc. Les Entreprises Archéotec inc.  8548, rue Saint-Denis Montréal H2P 2H2 Téléphone: 514.381.5112  Fax: 514.381.4995 www.archeotec.ca

Re: [gdal-dev] getting height from Geotiff DEM

2015-06-06 Thread Nicolas Cadieux
Sorry, This was the correct answer but for the wrong user list Nicolas Cadieux M.Sc. Les Entreprises Archéotec inc.  8548, rue Saint-Denis Montréal H2P 2H2 Téléphone: 514.381.5112  Fax: 514.381.4995 www.archeotec.ca On Jun 6, 2015 10:34, Nicolas Cadieux wrote: > > Hi, > >

Re: [gdal-dev] getting height from Geotiff DEM

2015-06-06 Thread Nicolas Cadieux
Hi, There is the " value tool plugin" that you can install. That will give you the values when you move your mouse across the raster. For more points, install the "point sampling tool" plugin. Nicolas Cadieux M.Sc. Les Entreprises Archéotec inc.  8548, rue Saint-De

Re: [gdal-dev] Gdal-Grid lidar.

2015-06-05 Thread Nicolas Cadieux
Thanks, This is a very interesting development.  I am trying to do a PhD using only open source software (Windows will soon go out the window!). I will take a good look at this post. Nicolas Cadieux M.Sc. Les Entreprises Archéotec inc.  8548, rue Saint-Denis Montréal H2P 2H2 Téléphone

Re: [gdal-dev] Gdal-Grid lidar.

2015-06-05 Thread Nicolas Cadieux
. Nicolas Cadieux M.Sc. Les Entreprises Archéotec inc.  8548, rue Saint-Denis Montréal H2P 2H2 Téléphone: 514.381.5112  Fax: 514.381.4995 www.archeotec.ca On Jun 5, 2015 7:13 PM, Even Rouault wrote: > > Le samedi 06 juin 2015 00:18:45, Nicolas Cadieux a écrit : > > Hi, > >

[gdal-dev] Gdal-Grid lidar.

2015-06-05 Thread Nicolas Cadieux
to a super computer if it will not multi-thread properly.   Thanks, Nicolas Cadieux (Gdal1.11.2 downloaded with OSGEO4W 64bit install with QGIS 2.8 on windows 7_64)  I use GDAL from the command line not from QGIS. Nicolas Cadieux M.Sc. Les Entreprises Archéotec inc.  8548, rue Saint-Denis Montr