Re: [gdal-dev] GDAL 3.11.0 "Eganville" beta1 available for testing

2025-04-17 Thread Scott via gdal-dev
On the following page: https://gdal.org/en/latest/programs/gdal_raster_calc.html#gdal-raster-calc-subcommand Example 3 at the very bottom has: gdal_calc -i I think it should be: gdal raster calc -i ...like example 1 and 2? Scott On 4/17/25 12:03, Even Rouault via gdal-dev wrote

Re: [gdal-dev] GeoJSON with "id" in properties and SQLite dialect

2025-04-07 Thread Scott via gdal-dev
As a work around, this seems to work: ogr2ogr -preserve_fid idtest1.geojson idtest.json ogrinfo -dialect sqlite -sql "select * from main" idtest1.geojson On 4/7/25 13:43, Rahkonen Jukka via gdal-dev wrote: Hi, I notised this question on gis.stackexchange https://gis.stackexchange.com/question

Re: [gdal-dev] GTI: override SRS of source tiles (disable reprojection)

2025-03-18 Thread Scott via gdal-dev
more lightweight. You can do lots of flexible, non-standard things by adding meta data (or whatever) for each tile. Here's a write-up and working example using 1 FGB tile index, 514 COG's and a LeafLet client: https://www.postholer.com/fgbcog/ Hope that helps! Scott On 3/18/25 17:13, Craig

Re: [gdal-dev] FlatGeobuf Layer vs Feature Columns

2025-03-06 Thread Scott via gdal-dev
If your using ogr2ogr try using the switch -emptyStrAsNull if you're not. On 3/6/25 15:39, Patrick Young via gdal-dev wrote: Hello, I translated some geojson to flatgeobuf where the geojson features have a variable number of properties (e.g. some features have a bunch of translations for the

Re: [gdal-dev] How to wrap a zarr in a zip and read it with vsizip?

2025-02-24 Thread Scott via gdal-dev
There's GDAL's sozip (Search Optimized Zip) utility as well. I have no idea if it works with .zarr. I'm sure someone will correct me! ;) cd nczarr_v2.zarr sozip ../nczarr_v2.zarr.zip . sozip -l /vsizip/../nczarr_v2.zarr.zip On 2/24/25 10:09, Kurt Schwehr via gdal-dev wrote: Hi all, I seem to

Re: [gdal-dev] gdalbuildvrt Max Value / Pixel Function

2025-02-13 Thread Scott via gdal-dev
WOW! Game changer. Any preliminary documentation on this? On 2/13/25 13:00, Daniel Baston via gdal-dev wrote: the next release of GDAL should have a replacement "gdal_calc" that would take multiple inputs and write a VRT that applies an expression to those inputs ___

Re: [gdal-dev] adding points to geometries

2025-01-26 Thread Scott via gdal-dev
that helps, Scott On 1/26/25 02:14, Javier Jimenez Shaw via gdal-dev wrote: Hi I have a vector layer (like /usr/share/qgis/resources/data/ world_map.gpkg) and I need to add a point at latitude 0 for every segment (in line or polygon) that crosses the equator. How can I do it? Thanks, J

Re: [gdal-dev] Seeking SQL wizardry

2025-01-08 Thread Scott via gdal-dev
Hey Jesse, I *think* I simplified your query a bit. Untested, but it may work. delete from {label_name} where gdal_get_pixel_value('{raster_fp}', {ndvi_band_num}, 'georef', ST_X(st_centroid(geom)), ST_Y(st_centroid(geom))) < 600 Scott On 1/8/25 12:53, Meyer, Jesse

[gdal-dev] Is it possible to write custom CRS WKTs within a GeoTiff?

2025-01-08 Thread Scott Henderson via gdal-dev
AXIS["ellipsoidal height (h)",up, ORDER[3], LENGTHUNIT["metre",1, ID["EPSG",9001]]], USAGE[ SCOPE["unknown"], AREA["Between 114°W and 108°W, northern hemisphere between equator and 84°N, onshore and offshore. Canada - Alberta; Northwest Territories (NWT); Nunavut; Saskatchewan. Mexico. United States (USA)."], BBOX[0,-114,84,-108]], REMARK["Custom WKT2 combining UTM_12N with WGS84 (G1150)”]] ``` Cheers, Scott ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Can valid cloud-optimized geotiffs have non-sequential tile ordering?

2025-01-07 Thread Scott Henderson via gdal-dev
Thanks for the speedy reply Even! I had not considered alternative tile layouts. I did open an issue here if others want to chime in: https://github.com/opengeospatial/CloudOptimizedGeoTIFF/issues/37 Scott > On 7. Jan 2025, at 17:23, Even Rouault wr

[gdal-dev] Can valid cloud-optimized geotiffs have non-sequential tile ordering?

2025-01-07 Thread Scott Henderson via gdal-dev
a COG? -- Scott Henderson Research Scientist, Earth & Space Sciences Data Science Fellow, eScience Institute Johnson Hall 251 University of Washington http://scottyhq.github.io ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.o

Re: [gdal-dev] DuckDB queries in GDAL/OGR master branch

2024-12-27 Thread Scott via gdal-dev
Yes, s3 (httpfs) and of course local (filesystem) both have read/write capabilities. httpfs is the reason duckdb works over network. http(s) is the most ubiquitous internet protocol/data storage. geoparquet files on a web server http(s) *will not work*. Drop FGB on any http* server and it just

Re: [gdal-dev] DuckDB queries in GDAL/OGR master branch

2024-12-27 Thread Scott via gdal-dev
) format is a far, far more simple cloud native solution. No changes to infrastructure required. Store your FGB on any http(s) server. For more complex queries, maybe an API might still be the more simple solution. Scott On 12/27/24 08:05, Michael Smith via gdal-dev wrote: With some recent

Re: [gdal-dev] EXTERNAL: Re: [EXTERNAL] Shape update/addition for Ceres

2024-12-23 Thread Reynolds, Scott via gdal-dev
Thanks Trent, that does help. We default to the triaxial ellipsoid in our definitions and I'll ask our astrodynamics team how they'd like to proceed. From: Hare, Trent M Sent: Monday, December 23, 2024 3:23 PM To: Reynolds, Scott Cc: Newcomb, Doug ; gdal-dev@lists.osgeo.org Subject

[gdal-dev] Shape update/addition for Ceres

2024-12-21 Thread Reynolds, Scott via gdal-dev
46km). ESRI:104972 exists for the spherical definition (470 km). Thanks, Scott Disclaimer The information contained in this electronic message and any attachments to this message are intended only for the individual(s) addressed in the message and may contain proprietary and confidential information.

[gdal-dev] Stacks versus mosaics with GTI Driver

2024-11-26 Thread Scott Henderson via gdal-dev
a custom script using the multidimensional raster API? Cheers, Scott ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Issue with the STACIT usage examples

2024-11-21 Thread Scott via gdal-dev
Well, I hit send on that a bit too soon. The solution that works for me is wrapping everything in single quotes: gdalinfo 'STACIT:"someurl":asset=image' Yes, the -sd is sooo much nicer! I don't have access to a windows box, but I expect it will function the same.

Re: [gdal-dev] Call for review on RFC 104: Adding a "gdal" front-end command line interface

2024-11-18 Thread Scott via gdal-dev
Question, Is there any plan to incorporate the python utilities, such as, gdal_calc? That would be extremely handy with the PDAL like pipelines. Scott On 11/18/24 09:58, Even Rouault via gdal-dev wrote: Hi, Please review https://github.com/OSGeo/gdal/pull/11216 : Adding a "gdal"

[gdal-dev] ogrtindex, gdaltindex feature request

2024-11-01 Thread Scott via gdal-dev
g (particularly with spatialite). If you've made it this far, thanks for listening! Scott -- www.postholer.com ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] How to locate where the raster min and max values are?

2024-10-29 Thread Scott via gdal-dev
It ain't pretty or efficient, but it's cheap. Here's min value. Remove 'r' from sort for max value: gdal2xyz.py -csv -skipnodata source.tif /dev/stdout | grep -v done | sort -rnk 3,3 -t "," | tail -1 result: -116.9916667,36.5417,46 On 10/29/24 17:31, Rahkonen Jukka via gdal-dev wrote: H

Re: [gdal-dev] [EXTERNAL] Re: GPKG geometry column name expectations with sqlite dialect

2024-09-30 Thread Scott via gdal-dev
What is the srid of your geometry? On 9/30/24 12:18, Meyer, Jesse R. (GSFC-618.0)[SCIENCE SYSTEMS AND APPLICATIONS INC] via gdal-dev wrote: /f/"select count(ST_Area('{lyr_name + '.' + geom_column_name}'))". (same outcome if re-arranged as count(…) from lyr_name instead) _

Re: [gdal-dev] [BULK] Re: [EXTERNAL] Re: GPKG geometry column name expectations with sqlite dialect

2024-09-30 Thread Scott via gdal-dev
Using st_setsrid(geom, null) gives a count of 0. Setting it to 6931 gives a count. Just for fun, run "select st_srid(geometry_column) from layername" On 9/30/24 12:28, Meyer, Jesse R. (GSFC-618.0)[SCIENCE SYSTEMS AND APPLICATIONS INC] wrote: EPSG:6931, so projected in meters.  Expecting a tota

Re: [gdal-dev] GPKG geometry column name expectations with sqlite dialect

2024-09-30 Thread Scott via gdal-dev
f I'm not sure I'll try, geom, geometry, _ogr_geometry_. Then, when creating a gpkg, I'll assign a generic name, geometry Scott On 9/30/24 11:35, Meyer, Jesse R. (GSFC-618.0)[SCIENCE SYSTEMS AND APPLICATIONS INC] via gdal-dev wrote: Hi, I have two geopackage database files that

Re: [gdal-dev] gdal_edit.py question

2024-09-12 Thread Scott via gdal-dev
Passing dozens of -mo switches to gdal_edit results in a too long command line. I'll have to figure something out for that. On 9/12/24 12:21, Even Rouault wrote: Scott, # add another tif to band 2 and add meta data for it: gdalwarp -q -srcband 1 -dstband 2 -t_srs EPSG:4326 src2.tif result

[gdal-dev] gdal_edit.py question

2024-09-12 Thread Scott via gdal-dev
x27;t just add it. This would be an extremely useful feature when working with NETCDF, HDF, etc. Thanks! Scott -- www.postholer.com ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Motion: Renew Even Rouault GDAL Maintainer Contract

2024-09-11 Thread Scott via gdal-dev
Only a year? Someone chain him to his desk already. You can't be too cautious. ;) Scott On 9/11/24 19:23, Howard Butler via gdal-dev wrote: PSC, I am motioning to renew Even's maintainer contract through the GDAL Sponsorship Program that is hosted by NumFOCUS for another year.

Re: [gdal-dev] Extending GDAL Color Interpretation enumeration for infra-red bands (+ band wavelength) ?

2024-08-31 Thread Scott via gdal-dev
anticipate every possible use now and in the future would be quite the feat. Scott On 8/31/24 07:21, Even Rouault via gdal-dev wrote: Hi, The GDAL Color Interpretation enumeration is a good start, but is quite limited regarding band spectral properties with just Red, Green, Bland, and nothing

Re: [gdal-dev] Attribute filter on remote Parquet file is slow

2024-08-28 Thread Scott via gdal-dev
I could be completely wrong here. My understanding is duckdb uses httpfs or possibly some variant of fsspec. I believe /vsis3 uses only libcurl, which doesn't *appear* to have support for httpfs. Again, I could be wildly wrong. On 8/28/24 09:45, Daniel Baston via gdal-dev wrote: Hello, I'm

Re: [gdal-dev] Question about gdal-dev archive - searching for information on reading HDF, SAR_CEOS metadata

2024-08-15 Thread Scott via gdal-dev
Hey Shawn, In google try something like: hdf4 site:lists.osgeo.org/pipermail/gdal-dev You may be able to narrow things down. On 8/15/24 12:15, Fox, Shawn D (US) via gdal-dev wrote: Is there any way to search the archive?  So far, I have only found a way to show the threads for a particular mo

Re: [gdal-dev] GDAL 3.9.2 release candidate available

2024-08-11 Thread Scott via gdal-dev
Ideally, it would be real nice to have an option that returns the coord and value on a single line. On 8/11/24 17:19, Scott via gdal-dev wrote: Looking at the news file, specifically about gdallocationinfo: gdallocationinfo: avoid extra newline character in -valonly mode if coordinate is

Re: [gdal-dev] GDAL 3.9.2 release candidate available

2024-08-11 Thread Scott via gdal-dev
Looking at the news file, specifically about gdallocationinfo: gdallocationinfo: avoid extra newline character in -valonly mode if coordinate is outside raster extent (3.9.0 regression) Having that new-line character is imperative. For instance, say I have a file called coords.txt with the va

Re: [gdal-dev] Building GDAL documentation with ReadTheDocs

2024-07-23 Thread Scott via gdal-dev
This is wildly important for systems without internet access. On 7/23/24 10:18, Greg Troxel via gdal-dev wrote: In my view, docs should be part of a package build and installed so they are available on the computer with the software. ___ gdal-dev mail

Re: [gdal-dev] Error linking srsinfo in 3.9.1 (rc1 or rc2)

2024-06-24 Thread Scott via gdal-dev
On debian 12: /usr/include/c++/12/cstdlib, line 75. Context: // Need to ensure this finds the C library's not a libstdc++ // wrapper that might already be installed later in the include search path. #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS #include_next #undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS #i

Re: [gdal-dev] Error linking srsinfo in 3.9.1 (rc1 or rc2)

2024-06-24 Thread Scott via gdal-dev
#include_next is part of the c++ version 12. You can find it's usage here on debian 12: /usr/include/c++/12/cstdlib, line 75 On 6/24/24 11:03, Scott via gdal-dev wrote: Yes, I saw that. It's the default code. I tried changing it to just 'include' early on and got a who

Re: [gdal-dev] Error linking srsinfo in 3.9.1 (rc1 or rc2)

2024-06-24 Thread Scott via gdal-dev
y DeZonia wrote: Scott, is it that you are using #include_next instead of #include? #include_next makes assumptions about the environment that #include does not. On Mon, Jun 24, 2024 at 12:53 PM Scott via gdal-dev mailto:gdal-dev@lists.osgeo.org>> wrote: Thanks for the docker instru

Re: [gdal-dev] Error linking srsinfo in 3.9.1 (rc1 or rc2)

2024-06-24 Thread Scott via gdal-dev
Even Rouault wrote: Le 24/06/2024 à 19:15, Scott a écrit : It's Debian 12. No, it's not clean. It's had several versions of gdal, et al, on it. It appears srsinfo in not finding stdlib.h and all the other apps do, which is the part I found odd. Docker is not the environment I'

Re: [gdal-dev] Error linking srsinfo in 3.9.1 (rc1 or rc2)

2024-06-24 Thread Scott via gdal-dev
ommon, although on quick reading, I couldn't spot a common point/solution between all those occurrences Even Le 24/06/2024 à 18:39, Scott via gdal-dev a écrit : When building 3.9.1 rc1/r2 I get the following when linking. If I comment srsinfo out of the makefile, all other gdal/ogr apps build

[gdal-dev] Error linking srsinfo in 3.9.1 (rc1 or rc2)

2024-06-24 Thread Scott via gdal-dev
When building 3.9.1 rc1/r2 I get the following when linking. If I comment srsinfo out of the makefile, all other gdal/ogr apps build fine with no issues. uname -a: Linux MyHost 6.1.0-21-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.90-1 (2024-05-03) x86_64 GNU/Linux Thanks! Build output below: [

Re: [gdal-dev] Python code with gdal_calc

2024-06-06 Thread Scott via gdal-dev
https://gdal.org/programs/gdal_calc.html see the examples at the bottom. There are a number of numpy.* statements. On 6/6/24 21:48, lefsky--- via gdal-dev wrote: I know gdal_calc calculates using "python syntax" but I've never seen documentation for using numpy functions within the calc stateme

Re: [gdal-dev] GDAL 3.9.0 rc1 is available

2024-05-06 Thread Scott via gdal-dev
Thanks for the -E, -field_sep and -ignore_extra_input in gdallocationinfo! It means we no longer have to pipe the input/output through paste -d or sed On 5/6/24 06:43, Even Rouault via gdal-dev wrote: Hi, I have prepared a GDAL/OGR 3.9.0 release candidate. NEWS at:   https://github.com/OSGe

Re: [gdal-dev] Efficient raster bounding box transformation?

2024-05-03 Thread Scott via gdal-dev
The bbox is created using the xmin,ymin,xmax,ymax found in the geometry. Assuming every pixel can be represented as a geometry, that's your bbox. On 5/3/24 13:18, Simon Eves via gdal-dev wrote: Yes, but that's just the corners. Consider, say, a raster that contains a satellite sweep which is n

Re: [gdal-dev] Best way to GTiff options for hyperspectral data

2024-04-23 Thread Scott via gdal-dev
You might create a Cloud Optimized GeoTiff (COG) from ENVI for frequently use band combinations, such as: gdalwarp -f COG -co COMPRESSION=DEFLATE -t_srs EPSG:4326 \ -src_band 23 -dst_band 1 \ -src_band 130 -dst_band 2 \ -src_band 420 -dst_band 3 \ [envi file] new.tif Now, you have a CO

Re: [gdal-dev] Feature Request: New -oo for VRT

2024-03-20 Thread Scott via gdal-dev
en Le 20/03/2024 à 17:24, Scott via gdal-dev a écrit : It would be nice to have an open option to substitute a string of text with some other value, treating .vrt something like a template. Such as:    -oo REPLACE="'sourceString'='targetSt

[gdal-dev] Feature Request: New -oo for VRT

2024-03-20 Thread Scott via gdal-dev
It would be nice to have an open option to substitute a string of text with some other value, treating .vrt something like a template. Such as: -oo REPLACE="'sourceString'='targetString'" Thoughts? Thanks for listenin

[gdal-dev] WriteBlock() not supported using JP2ECW driver?

2024-02-07 Thread Reynolds, Scott via gdal-dev
Hi, I'm trying to create a JPEG2000 file using the JP2ECW driver, but I'm getting "WriteBlock() not supported...". The same code works using the PNM driver. What am I missing? Thanks, Scott Disclaimer The information contained in this electronic message and any attachme

Re: [gdal-dev] gdal_translate shifted values

2024-01-31 Thread Scott via gdal-dev
I'd check both files *before* all the processing. Something like: gdallocationinfo -l_srs EPSG:4326 gribFile -110 40 gdallocationinfo -l_srs EPSG:4326 tiffFile -110 40 That will tell narrow it down. On 1/31/24 15:53, Furuya, Takahiro via gdal-dev wrote: Hi gdal-dev, I am Takahiro, a student

Re: [gdal-dev] Passing Python PixelFunctionArguments or kwargs from command line?

2024-01-29 Thread Scott via gdal-dev
truly make VRT's dynamic. Instead of a temporal set of rasters, it could be a mix of elevation and land type. You get the idea. Right now, it's easy enough to have the .vrt act as a template and do substitution with desired values. Passing arguments would make it very, very clean

[gdal-dev] Passing Python PixelFunctionArguments or kwargs from command line?

2024-01-28 Thread Scott via gdal-dev
With a python pixel function in a .vrt file, is it possible to pass values from the command line? Example: gdal_translate ... -lco PixelFunctionArguments=? or -lco -kwargs=? Basically I want to change the 'min' and 'max' values on the command l

Re: [gdal-dev] Convert alpha to nodata?

2024-01-20 Thread Scott via gdal-dev
+10 I'll buy them a 12 pack of their favorite micro-brew. On 1/19/24 09:32, Even Rouault via gdal-dev wrote: A nice exercice for (Pythonist) contributors would be to add a -f VRT capability to gdal_calc.py that would essentially automate the writing of such VRT using Python pixel functions. Ju

[gdal-dev] Reading NetCDF on S3 with /vsis3/

2023-12-02 Thread Scott Staniewicz via gdal-dev
Are there any known limitations that prevent NetCDF datasets from being read using `/vsis3/`? I've created some NetCDF4 datasets with h5netcdf, and they are readable locally and recognized by gdal. But when I put them on S3, `gdalinfo` only recognizes them with the HDF5 driver, and fails when I fo

Re: [gdal-dev] slow translate with OVERVIEW_LEVEL=NONE when no overviews exist

2023-11-24 Thread Scott via gdal-dev
Over the network it takes 23 seconds: time gdal_translate -oo OVERVIEW_LEVEL=NONE -outsize 219 226 /vsicurl/https://github.com/mdsumner/cog-example/raw/main/cog/sentinel-image.tif net.tif real 0m23.909s user 0m4.374s sys 0m1.021s Saving the file locally and translating it's fractional sec

Re: [gdal-dev] GDAL 3.8.0 is released

2023-11-13 Thread Scott via gdal-dev
Yee haw! Thanks guys for all your hard work! On 11/13/23 09:48, Even Rouault via gdal-dev wrote: Hi, On behalf of the GDAL/OGR development team and community, I am pleased to announce the release of GDAL/OGR 3.8.0. GDAL/OGR is a C++ geospatial data access library for raster and vector file for

Re: [gdal-dev] Segfault with ogr2ogr and Parquet

2023-11-05 Thread Scott via gdal-dev
Thanks for the info Even! On 11/5/23 13:26, Even Rouault wrote: Scott, I don't reproduce anymore on master, and I strongly suspect this is the same issue as https://lists.osgeo.org/pipermail/gdal-dev/2023-November/057856.html which I fixed post-beta1 Even Le 05/11/2023 à 19:57, Scot

Re: [gdal-dev] Segfault with ogr2ogr and Parquet

2023-11-05 Thread Scott via gdal-dev
Check that. This is only on 3.8beta. Apologies. On 11/5/23 09:35, Scott via gdal-dev wrote: On debian 10 linux, using gdal 3.7.1 or 3.8beta, built with apache arrow 12.0, I get a segfault immediately after running either of these commands: ogr2ogr tst.gpkg PARQUET:"/vsicurl/

[gdal-dev] Segfault with ogr2ogr and Parquet

2023-11-05 Thread Scott via gdal-dev
r tst.gpkg /vsis3/overturemaps-us-west-2/release/2023-10-19-alpha.0/theme=admins I appreciate your help! Scott ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] GDAL 3.7.3 RC1 available

2023-10-30 Thread Scott via gdal-dev
Looking at the release notes did #8262 make it in? https://github.com/OSGeo/gdal/pull/8262 On 10/30/23 09:15, Even Rouault via gdal-dev wrote: Hi, I have prepared a GDAL/OGR 3.7.3 release candidate. Pick up an archive among the following ones (by ascending size):   https://download.osgeo.o

Re: [gdal-dev] help needed with pygdaltools library, documentation sparse

2023-10-11 Thread Scott via gdal-dev
//pasteboard.co/1wIMI9xRymkZ.png <https://pasteboard.co/1wIMI9xRymkZ.png> -Original Message- From: Rahkonen Jukka <mailto:jukka.rahko...@maanmittauslaitos.fi>> Sent: Wednesday, October 11, 2023 2:12 AM To: Catania, Luke A ERDC-RDE-GRL-VA CIV <mailto:luke.a.cata...@e

Re: [gdal-dev] help needed with pygdaltools library, documentation sparse

2023-10-10 Thread Scott via gdal-dev
-nln is being ignored because the data layer you're -updating -appending to exists. You can't rename a layer if it has a name. Remove -nln option Next you are trying to write a collection as a linestring. Use -explodecollections (if exists in your install) and/or use -nlt PROMOTE_TO_MULTI Tr

[gdal-dev] VSIGetMemFileBuffer Returns NULL When Copying Vector Dataset to Vsimem

2023-10-03 Thread Soren Saville Scott via gdal-dev
? Alternatively, maybe there's a better way to 'emplace' datasets inside some other file? Thanks, Soren Saville Scott ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Using ogr2ogr with limited memory

2023-09-28 Thread Scott via gdal-dev
On Thu, Sep 28, 2023 at 3:18 PM Scott via gdal-dev mailto:gdal-dev@lists.osgeo.org>> wrote: Thanks for digging into that Even! Can I create my new .fgb in sections? If I limit the number of source rows with -sql, doing that multiple times with -update, will it still build t

Re: [gdal-dev] Using ogr2ogr with limited memory

2023-09-28 Thread Scott via gdal-dev
ncement to mention this requirement: https://github.com/OSGeo/gdal/pull/8490 Le 28/09/2023 à 19:17, Scott a écrit : USA.fgb is 36 GB. I've renamed it from its original source which can be found here: https://beta.source.coop/vida/google-microsoft-open-buildings ogr2ogr -sql "select

Re: [gdal-dev] Using ogr2ogr with limited memory

2023-09-28 Thread Scott via gdal-dev
I get the same error on OS AWS Linux 2. Also, on either OS with source .parquet instead of .fgb. On 9/28/23 10:17, Scott via gdal-dev wrote: USA.fgb is 36 GB. I've renamed it from its original source which can be found here: https://beta.source.coop/vida/google-microsoft-open-buil

Re: [gdal-dev] Using ogr2ogr with limited memory

2023-09-28 Thread Scott via gdal-dev
) = 0.8323 area_in_meters (Real) = 178.5448 POLYGON ((-64.6397672401299 17.7220665249078,-64.6397654280552 17.722041016034,-64.6395789582891 17.7220531822569,-64.6395832735872 17.7221139302758,-64.639696737462 3 17.7221065273415,-64.639698399651 17.7221299263498,-64.6398064310524 17.7221228777942

Re: [gdal-dev] Using ogr2ogr with limited memory

2023-09-28 Thread Scott via gdal-dev
I should have been more specific. One particular machine has 8GB of memory. When I try to do the most simple ogr2ogr command on large files, the host runs out of memory (vmstat shows this) and ogr2ogr terminates with 'Killed', nothing more. The data formats I have experienced this with are

Re: [gdal-dev] GDAL Interpolation Help

2023-09-27 Thread Scott via gdal-dev
Averaging rasters is a common task. Often I see developers write many lines of python to do simple tasks like this. The following GDAL command should give you the results you're looking for: gdal_calc.py -A input1.tif -B input2.tif --outfile=result.tif --calc="(A+B)/2" The above command was

[gdal-dev] Using ogr2ogr with limited memory

2023-09-26 Thread Scott via gdal-dev
Any tips for using ogr2ogr to use only a specified amount of RAM? I'm not having any luck. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] compiling gdal: ogr_ODS error

2023-08-27 Thread Scott
et version: 12.0.1 -- Found the ArrowDataset shared library: /opt/local/lib/libarrow_dataset.so.1200.1.0 -- Found the ArrowDataset import library: ARROW_DATASET_IMPORT_LIB-NOTFOUND -- Found the ArrowDataset static library: /opt/local/lib/libarrow_dataset.a On 8/27/23 00:42, andy wrote:

Re: [gdal-dev] compiling gdal: ogr_ODS error

2023-08-26 Thread Scott
Parquet issue. Do you have apache-arrow installed? https://arrow.apache.org/docs/index.html If you cmake it and install it in the default path, gdal should find it. I'm using apache-arrow 12.0.1 with gdal 3.7.1. Even solved this for me. The OGDI may be a different issue. It seems to be looking

Re: [gdal-dev] ogr2ogr postgis to sqlite composite primary key issueissue

2023-08-15 Thread Scott
023 at 12:57:14 PM GMT+12, Scott wrote: You could build your column list without that specific column and pass it to ogr2ogr (bash): ogr2ogr -sql "select $(psql -d mydb --pset='footer=off' -F',' -qAc "select * from table where false" |sed 's/columnToOmit,//g&#

Re: [gdal-dev] ogr2ogr postgis to sqlite composite primary key issueissue

2023-08-15 Thread Scott
You could build your column list without that specific column and pass it to ogr2ogr (bash): ogr2ogr -sql "select $(psql -d mydb --pset='footer=off' -F',' -qAc "select * from table where false" |sed 's/columnToOmit,//g') from table" target.gpkg PG:dbname=mydb On 8/15/23 17:12, Brent Wood vi

Re: [gdal-dev] Directories and Parquet

2023-07-28 Thread Scott
For what it's worth, this is as far as I've gotten and it works: ogr2ogr -dialect sqlite -sql @admins.sql -nln over -overwrite admins.gpkg /vsis3/overturemaps-us-west-2/release/2023-07-26-alpha.0 I've got a cheat sheet set up with the sql at: https://www.postholer.com/articles/Overature-Cheat-

Re: [gdal-dev] Parquet and nest structures (JSON)

2023-07-28 Thread Scott
pports a varchar[] or integer[] type. P On Thu, Jul 27, 2023 at 2:51 PM Scott wrote: ogr2ogr'ing parquet data to GeoPackage I'm getting the following warnings: Warning 1: Field names of unhandled type map> ('names')> ignored Warning 1: Field sources of unhandled type

[gdal-dev] Parquet and nest structures (JSON)

2023-07-27 Thread Scott
vel = 2 and theme = 'admins'" -nln admin -overwrite admin.gpkg /vsis3/overturemaps-us-west-2/release/2023-07-26-alpha.0 It would be nice to save these JSON structures in the .gpkg, but I'm not sure how to go about it. Any help would be greatly appreciated! Scott ___

Re: [gdal-dev] Installing Arrow/Parquet

2023-07-26 Thread Scott
, GDAL CMake will autodetect it. Otherwise you'll have to pass -DArrow_DIR=${install_prefix}/lib/cmake/Arrow you may also install a prebuilt arrow-cpp package: cf https://arrow.apache.org/install/  and GDAL CMake will autodetect it Le 26/07/2023 à 21:17, Scott a écrit : I'm having a diff

[gdal-dev] Installing Arrow/Parquet

2023-07-26 Thread Scott
I'm having a difficult time building gdal with Arrow/Parquet drivers on debian. Could someone show me exactly what cmake -D switches, paths and sources I need? I've cloned github.com/apache/arrow, and added it to my paths. Clearly, I'm missing something. Thanks!

Re: [gdal-dev] Rotating a raster?

2023-07-17 Thread Scott
3dd980b240946403e1f8024c?w=cHVibGljQHBvc3Rob2xlci5jb20&url=http%3A%2F%2Fwww.spatialthoughts.com&userId=8747767&signature=9b2a49a0cd6960e4> On Sun, Jul 16, 2023 at 3:57 AM Scott wrote: Someone over on reddit.com/r/gis <http://reddit.com/r/gis> asked a seemingly simpl

Re: [gdal-dev] Setting up bash completions on Ubunto 18

2023-07-16 Thread Scott
It looks like it's not in your path. If you built gdal with the default install prefix it should be in /usr/local/bin. Make sure that's in your path: export PATH=$PATH:/usr/local/bin It seems odd that it's not in your path, though. On 7/16/23 16:01, Eric Knudstrup via gdal-dev wrote: I have b

[gdal-dev] Rotating a raster?

2023-07-15 Thread Scott
Someone over on reddit.com/r/gis asked a seemingly simple question, "How to rotate a raster by some value using xmin/ymax as the center of rotation?" The poster was trying to do this using C++, GDAL libs. Any thoughts on how to do this with code or gdal utils? Thanks! ___

[gdal-dev] Off-topic: speaking of viewsheds....

2023-07-07 Thread Scott
The following viewsheds were created with GDAL, one tif for every tenth of a mile along the 2,650 mile Pacific Crest Trail. Stitched together with ffmpeg: https://youtu.be/tmY27ZIVfpA On 7/7/23 12:17, Tamas Szekeres wrote: Benoît, As far a I can understand - depending on the elevation model

Re: [gdal-dev] gdal_rasterize parameters not working

2023-07-03 Thread Scott
gdal_grid is probably a better choice. On 7/3/23 16:06, Clive Swan wrote: Hi Thanks for the information.  The Shp file (WGS84), the aim is to export to a Heatmap. The Shp was exported to a Tif: coastal_2000-te.tif coastal_2000-tr.tif The pixel output ranges from 0-3 This doesn't produce

Re: [gdal-dev] gdal_rasterize parameters not working

2023-07-03 Thread Scott
You're using the -tr and -ts. You can only use one or the other, not both. On 7/3/23 07:35, Clive Swan wrote: I am trying to create a heatmap from a Shp Point feature. The output is doesn’t cover the Shp?? I entered the following gdal gdal_rasterize parameters. gdal_rasterize -a hazard_l_1

Re: [gdal-dev] ogr2ogr sqlite dialect and fgb format

2023-06-28 Thread Scott
There may be a way to address the underlying issue, I don't know what it is. In lieu of that, here's a work around in 2 steps in 3.7. Create a gpkg: ogr2ogr -sql "select * from roadbed where source_id = 13350003311" tmp.gpkg /vsizip/NYC_DoITT_Planimetric_OpenData.gdb.zip Then do it with -dia

Re: [gdal-dev] ogr2ogr sqlite dialect and fgb format

2023-06-28 Thread Scott
The last line says: no such table: roadbed See if it exists in the gdb: ogrinfo dataset.gdb On 6/28/23 08:18, Patrick Young wrote: Hi, I'm playing around with the gdb dataset https://data.cityofnewyork.us/Transportation/NYC-Planimetrics/wt4d-p43d

Re: [gdal-dev] Folder shared with you: "GDal Community"

2023-06-27 Thread Scott
It looks like the original requester is named "Rob" and Vijay is doing it for Rob and Vijay wants us to do it for him. Delegating his workload it seems... On 6/27/23 09:55, Greg Troxel wrote: "Vijay Kurhade (via Google Drive)" writes: I've shared an item with you: GDal Community https://dr

Re: [gdal-dev] gdal_translate tiff to netcdf

2023-06-20 Thread Scott
It sounds like the install wasn't built with libnetCDF. Try this: gdalinfo --formats If it's part of your install you'll see it. On 6/20/23 16:37, Abigaïl Dah wrote: Hello, I am trying to convert a file with the format GEOTIFF to netcdf using the command line: gdal_translate -of NetCDF

Re: [gdal-dev] OGR CSV oddity

2023-06-17 Thread Scott
single column header without trailing comma, but the write side still generates one Le 17/06/2023 à 17:54, Scott a écrit : If I select a single column from a table, the header column name has a trailing comma. If I select more than 1 column it does not. Example: ogr2ogr -f CSV -sql "select

[gdal-dev] OGR CSV oddity

2023-06-17 Thread Scott
If I select a single column from a table, the header column name has a trailing comma. If I select more than 1 column it does not. Example: ogr2ogr -f CSV -sql "select col1 from table limit 1" /vsistdout/ source.gpkg Output: col1, 123 Tested on 3.5.1 and 3.7 I've tried this on various column

Re: [gdal-dev] How to decrease file size of colored raster bands?

2023-06-01 Thread Scott
import os os.system([gdal command here]) On 6/1/23 10:41, afernandez wrote: Hi Scott, As I mentioned to Laurentiu, I'm still not getting the handle on how to use overviews but will keep working at it. However, this is only useful to me (and probably to other people) if they can be used

Re: [gdal-dev] How to decrease file size of colored raster bands?

2023-06-01 Thread Scott
As a test you can skip the whole python debacle and try this: gdal_translate -f COG -co COMPRESS=DEFLATE -scale 0 255 -ot Byte source.tif target.tif On 6/1/23 07:35, afernandez wrote: Hello, I'm generating a raster file with GDAL. The pseudo-code (where the raster is loaded as 'var') for th

Re: [gdal-dev] Failure to read some geojson files

2023-04-28 Thread Scott
Yeah, the raw works. It's easiest to grab it with vsi: ogrinfo /vsicurl/https://github.com/OSGeo/PROJ/raw/9.1/docs/plot/data/coastline.geojson On 4/28/23 15:09, Joaquim Manuel Freire Luís via gdal-dev wrote: Thanks Andrea, I thought that could be the case and downloaded the file with a right

Re: [gdal-dev] [Question]Output from gdal_translate projwin is different from geoserver WCS GetCoverage request?

2023-04-03 Thread Scott
If I run: gdal_translate -projwin 137.915315044103 -36.51629558851893 154.64770004642423 -40.081875882617666 geoserver.tif new.tif It completes with warning: Warning 1: Computed -srcwin -1 -1 17 4 falls partially outside raster extent. Going on however. Try again with your -projwin values wi

Re: [gdal-dev] [EXT] GDAL sponsored maintenance report: Aug 2021-March 2023

2023-03-27 Thread Scott
The significant role GDAL has in GIS software cannot be overstated. Virtually all open source GIS would not exist without it. Proprietary software would be, well, proprietary. Thanks to Evan and Frank and the not frequently recognized developers for all they do. GDAL is huge, it's the center o

[gdal-dev] PointOnSurface returning (0, 0, 0)

2023-03-15 Thread Reynolds, Scott
deas what I'm doing wrong? Thanks, Scott #include #include "ogrsf_frmts.h" #include "ogr_geometry.h" static void CPL_STDCALL CplErrorHandler(CPLErr cplErr, int nError, char* pszErrorTxt) { std::cout << "GDAL(" << nError << "): "

Re: [gdal-dev] Difference between ogr2ogr and Python reprojection

2023-03-14 Thread Scott
While I don't have a direct answer to your question I might ask, why use 20 lines of python code when 1 line of ogr2ogr gives the correct result? On 3/14/23 11:15, Dion-Degodez,Nicolas (ECCC) wrote: _Context_ We are trying to reproject a GeoJSON polygon to EPSG:4326. In some cases, depending

Re: [gdal-dev] FileGDB_COMPILE fails during CMake

2023-02-27 Thread Scott
ender immediately by email if you have received this email by mistake and delete this email from your system. JBA Risk Management Limited is registered in England, company number 07732946, 1 Broughton Park, Old Lane North, Broughton, Skipton, North Yorkshire, BD23 3FD, England. -Original Me

Re: [gdal-dev] FileGDB_COMPILE fails during CMake

2023-02-24 Thread Scott
With gdal >= 3.6 OpenFileGDB is built in by default, no need for external API. On 2/24/23 08:37, Jon Morris wrote: Hi all, I’ve been upgrading our build script from autotools to CMake and I’ve almost got it working, except for FileGDB. I’ve added the cmake parameters  -DFileGDB_ROOT=/usr/l

Re: [gdal-dev] Terrain Analysis

2023-02-21 Thread Scott
You can also create a .vrt of your raster(s) and embed python (or C) to do the analysis. Any pip package you can find to do analysis can be used. VRT also allows for JIT compiling. See the VRT docs for details: https://gdal.org/drivers/raster/vrt.html On 2/21/23 08:38, Roa Carvajal, Camila via

Re: [gdal-dev] -sql switch in gdal_rasterize

2023-02-12 Thread Scott
Thanks Even! On 2/12/23 08:36, Even Rouault wrote: Implemented in https://github.com/OSGeo/gdal/pull/7235 Le 12/02/2023 à 17:16, Scott a écrit : The hope was to have the gdal_rasterize -sql switch work like it does in the other gdal utilities, ie, -sql @/path/to/source.sql. That consistency

Re: [gdal-dev] -sql switch in gdal_rasterize

2023-02-12 Thread Scott
a Rahkonen- -Alkuperäinen viesti- Lähettäjä: gdal-dev Puolesta Scott Lähetetty: lauantai 11. helmikuuta 2023 23.15 Vastaanottaja: gdal-dev@lists.osgeo.org Aihe: [gdal-dev] -sql switch in gdal_rasterize Other gdal utilities that use the -sql switch allow you to specify a path to an sql fil

[gdal-dev] -sql switch in gdal_rasterize

2023-02-11 Thread Scott
Other gdal utilities that use the -sql switch allow you to specify a path to an sql file preceded with the @ symbol, such as: -sql @/path/to/source.sql Is there a way to do this with gdal_rasterize? Adding the above to an --optfile returns the same error as doing it on the command line. TIA

  1   2   >