Re: [gdal-dev] Question about GDAL API: way to find out if CS is SPCS

2020-02-07 Thread Even Rouault
> thanks for the answer. I am using C/C++ and I was expecting to find a > function/method like "GetSPCSZone", "IzSPCS" or similar. There's no such function. But you can just open the data/stateplane.csv file to find a match of EPSG code. An alternative is to use exportToWkt() with WKT2 output an

Re: [gdal-dev] Question about GDAL API: way to find out if CS isSPCS

2020-02-07 Thread Chris Smemoe
Sergey, As far as I know, there are no functions like that in GDAL. Perhaps those functions could be added to the API. I'd recommend posting the question to gis.stackexchange.com and try to get an answer there. I have some rather complicated code I use to determine if I'm in state plane coordin

Re: [gdal-dev] Question about GDAL API: way to find out if CS is SPCS

2020-02-07 Thread Sergey Suloev
hi, Alan, On 2/7/20 5:36 PM, Alan Snow wrote: If you use python, the pyproj CRS class can help. >>> from pyproj import CRS >>> crs = CRS("EPSG:26945") >>> crs Name: NAD83 / California zone 5 Axis Info [cartesian]: - X[east]: Easting (metre) - Y[north]: Northing (metre) Area of Use: - name: U

Re: [gdal-dev] Question about GDAL API: way to find out if CS is SPCS

2020-02-07 Thread Alan Snow
If you use python, the pyproj CRS class can help. >>> from pyproj import CRS >>> crs = CRS("EPSG:26945") >>> crs Name: NAD83 / California zone 5 Axis Info [cartesian]: - X[east]: Easting (metre) - Y[north]: Northing (metre) Area of Use: - name: USA - California - SPCS83 - 5 - bounds: (-121.42, 32.

[gdal-dev] Question about GDAL API: way to find out if CS is SPCS

2020-02-07 Thread Sergey Suloev
Hello, in my project I am using GDAL to manage coordinate systems. I am looking for a function/class that can tell me if a specific coordinate system is a State Plane Coordinate System and give a zone number. Thank you very much ___ gdal-dev mailing

Re: [gdal-dev] [Python bindings] BuildOverviews() not supported for VRT dataset

2020-02-07 Thread umbertofilippo
just edited the previous post (again, wrong copy and paste, shame on me) -- Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] [Python bindings] BuildOverviews() not supported for VRT dataset

2020-02-07 Thread umbertofilippo
Yeah you're totally right obviously :) i forgot to copy and paste ds = gdal.BuildVRT(out_vrt, rasters, options=vrt_options) in between... out_vrt = os.path.join(out_dir, 'mosaic.vrt') ds = gdal.BuildVRT(out_vrt, [raster1.tif, raster2.tif]) ds = None # this did the trick! ds = gdal.BuildVRT(out_vr

Re: [gdal-dev] [Python bindings] BuildOverviews() not supported for VRT dataset

2020-02-07 Thread Even Rouault
On vendredi 7 février 2020 03:58:02 CET umbertofilippo wrote: > Solved by looking at this answer > dvrt/299218> > > > out_vrt = os.path.join(out_dir, 'mosaic.vrt') > ds = gdal.BuildVRT(out_vrt, [raster1.tif, raster2.t

Re: [gdal-dev] [Python bindings] BuildOverviews() not supported for VRT dataset

2020-02-07 Thread umbertofilippo
Solved by looking at this answer : out_vrt = os.path.join(out_dir, 'mosaic.vrt') ds = gdal.BuildVRT(out_vrt, [raster1.tif, raster2.tif]) ds = None # this did the trick! factors = [128, 256, 512] gdal.SetCon

[gdal-dev] [Python bindings] BuildOverviews() not supported for VRT dataset

2020-02-07 Thread umbertofilippo
Hello everybody, I am trying to build overviews in a VRT dataset with python GDAL. I try this code: out_vrt = os.path.join(out_dir, 'mosaic.vrt') ds = gdal.BuildVRT(out_vrt, [raster1.tif, raster2.tif]) factors = [128, 256, 512] gdal.SetConfigOption('COMPRESS_OVERVIEW', 'DEFLATE') ds.BuildOvervie