Vanuatu GIS Feed
banner
vanuatugis.bsky.social
Vanuatu GIS Feed
@vanuatugis.bsky.social
The Vanuatu GIS Feed will be used to aggregate site posts. It is monitored, but will probably not be very 'personal'. - @raetlomi.bsky.social
Technology Feed @vanuatutech.bsky.social.
231124
Creating an Event in ArcGIS Hub
Hey GeoSnappers! In this video, we'll walk you through how to create an event in ArcGIS Hub. Whether you're hosting virtual training sessions, or planning on-site outreach activities, ArcGIS Hub events make it easier than ever to share details, manage registrations and organize content! To learn more about ArcGIS Hub events – check out this documentation on how to set them up: Create an event https://doc.arcgis.com/en/hub/community/create-an-event.htm Please include links in full form with HTTPS and chapters for your video with timestamps 00:00 Intro 00:25 Creating the project 00:56 Editing the projects page 02:29 Associating an initiative 02:25 Outro ---------------------------------------------------------------------------------------- About ArcGIS Hub ► Product Page https://www.esri.com/en-us/arcgis/products/arcgis-hub/overview ►Blogs https://www.esri.com/arcgis-blog/?s=#&products=arcgis-hub ► Esri Community https://community.esri.com/t5/arcgis-hub/ct-p/arcgis-hub ---------------------------------------------------------------------------------------- About GeoSnaps | Videos by Esri Canada      ► A collection of bite-sized technical videos about all things in the ArcGIS universe.  ► Have a suggestion for a GeoSnap?  Email us at [email protected] ► Be sure to subscribe to our channel and hit the notification bell to stay up-to-date with the latest tutorials and technical inspiration: https://www.youtube.com/user/esricanadatv  To learn more, contact us: https://esri.ca/contactus
www.youtube.com
December 9, 2025 at 3:15 PM
GEE Python analysis over multiple features exported to dataframe
I am analysing some ERA5 wind data with Google Earth Engine in Python to extract the mean wind speed at a number of locations (buffers around points). I have successfully done this for a single location and extracted the data to a dataframe. But I have been trying to update the code to run the analysis now over multiple locations in a feature collection with no success. My latest attempt is with nested map functions when I use reduceRegion to map over features then over image collection. It gives the error Image collection object is not callable What is wrong? Latest code version below: ERA5 = ee.ImageCollection("ECMWF/ERA5/MONTHLY") #Define start and end periods start_period = ee.Date('2018-01-01') end_period = ee.Date('2022-01-01') #filter dataset to start and end period ERA5 = ERA5.filter(ee.Filter.date(start_period, end_period)) #Calculate wind speed as a windspeed band def windspeed(image): wind_10m = image.expression('sqrt(u**2 + v**2)', { 'u': image.select('u_component_of_wind_10m'), 'v': image.select('v_component_of_wind_10m') }).rename('windspeed') time = image.get('system:time_start') return wind_10m.set('system:time_start', time) ERA5windspeed = ERA5.map(windspeed) #Calculate mean wind speed for geometry per image #import csv and convert to feature collection sg_fc = feature2ee('sg_csv.csv') #give geometry to feature collection sg_fc_geo = sg_fc.geometry() #add a buffer around each point in feature collection def addBuffer(feature): return feature.buffer(10000) #map function over each feature buffers = sg_fc.map(addBuffer) #reduce over area of interest to calculate average def mean_speed(image): meanDict = image.select('windspeed').reduceRegion( reducer = ee.Reducer.mean(), geometry = buffers, scale = 27830, ) return image.set(meanDict) #map function ERA5meanspeed = buffers.map(ERA5windspeed.map(mean_speed)) #**this creates an error saying Image Collection object is not callable #Export data into a dataframe #convert bands into arrays time = ERA5meanspeed.aggregate_array('system:index').getInfo() windspeed = ERA5meanspeed.aggregate_array('windspeed').getInfo() #combine arrays into dataframe windspeed_out = pd.DataFrame ({'time':time,'windspeed':windspeed}) #add location in for reference to which site windspeed_out['x'] = list(geometry.getInfo().values())[1][0] windspeed_out['y'] = list(geometry.getInfo().values())[1][1]
gis.stackexchange.com
December 9, 2025 at 2:12 PM
Mapproxy source from WMTS bounding box issue
I am trying to create an offline version from here: https://wmts.maptiler.com/aHR0cHM6Ly9ubHMudGlsZXNlcnZlci5jb20vZnBzVVpieHRndGtuL2luZGV4Lmpzb24/wmts and here is my current config: services: demo: wms: md: title: OS 10k 1888 tms: origin: 'nw' layers: - name: osgb10k1888 title: OS 10k 1888 sources: [osgb10k1888_cache] caches: osgb10k1888_cache: sources: [osgb10k1888_wmts] grids: [webmercator] sources: osgb10k1888_wmts: type: tile grid: webmercator url: https://nls-0.tileserver.com/fpsUZbxtgtkn/%(z)s/%(x)s/%(y)s.jpg grids: webmercator: base: GLOBAL_WEBMERCATOR This all seems to work fine with the resulting levels and resolutions matching the source correct: Level and Resolutions Level Resolution 0 78271.51696402048 1 39135.75848201024 2 19567.87924100512 3 9783.93962050256 4 4891.96981025128 5 2445.98490512564 6 1222.99245256282 7 611.49622628141 8 305.748113140705 9 152.8740565703525 10 76.43702828517625 11 38.21851414258813 12 19.109257071294063 13 9.554628535647032 14 4.777314267823516 15 2.388657133911758 16 1.194328566955879 17 0.5971642834779395 18 0.29858214173896974 however the resulting bounding box is: -20037508.342789244, -20037508.342789244, 20037508.342789244, 20037508.342789244 I have tried adding the bbox to the grid based on the source: -7.793077 49.852539 1.790425 60.894042 but this the screws up all the resolutions and causes the map to be misaligned do i need to add all the res into the grid and specify the coords instead of using the web global default?
gis.stackexchange.com
December 9, 2025 at 12:06 PM
Backup QGIS (3.2.1) layer to independent PostGIS table?
I'd like to make multiple, progressive backup copies of QGIS (3.2.1) layers that are stored in PostGIS tables. I've tried multiple routes to export them as files on disk, but they all seem to destroy some aspect of the data - shuffle the order, add fields, reduce floats to integers, convert LineStrings to MultiLineStrings... (Long story here) My destination (HEC-RAS) is rather picky about such details.   Yes, I know how to make incremental backups of the entire Postgre database with pgAdmin4, but I don't know any way to extract a single table from one of them.   I found this and it actually makes a complete snapshot of your QGIS project in PostGIS: http://www.bostongis.com/blog/index.php?/archives/271-New-in-QGIS-3.2-Save-Project-to-PostgreSQL.html Layer -> Data Source Manager -> PostgreSQL -> Edit check the box Allow saving/loading QGIS projects in the database Database -> DB Manager -> Providers -> (select database) -> Schema -> Create Schema Project -> Save to -> PostgreSQL -> select schema, name project/version --> Unfortunately it does not save its own copies of the actual layer tables, only references to the tables in the original project. Editing those also edits your "backups"!   Saving a Layer Definition File likewise does not make its own copies of the actual tables: http://getspatial.com/gisblog/tip-of-the-day-create-layer-definition-files-for-reuse-and-consistency/ save as a Layer Definition File. This will save all characteristics of this layer from the source, including connection information if it is a database layer, to projections, spatial filters, styles, and labeling. --> But not the actual data table...   There are several ways to export a layer to an existing PostGIS table, but I can't find any that will save to a new table. You can create a new table: Database -> DB Manager -> Providers -> (select schema) -> Table (tab) -> Create Table -> (name)... --> But you must manually define all the columns and attributes!   This sounded promising: Processing -> Toolbox -> GDAL -> Import Vector into PostGIS database (available connection) select database, layer, geometry type, CRS, table name, options... It doesn't error: Processing algorithm… Algorithm 'Import vector into PostGIS database (available connections)' starting… Input parameters: { 'ADDFIELDS' : False, 'APPEND' : False, 'A_SRS' : 'EPSG:2226', 'CLIP' : False, 'DATABASE' : 'postgres', 'DIM' : 0, 'GEOCOLUMN' : 'geom', 'GT' : '', 'GTYPE' : 4, 'INDEX' : False, 'INPUT' : 'dbname=\'rivergis\' host=127.0.0.1 port=5432 user=\'postgres\' password=\'Ridgeview\' key=\'XsecID\' table=\"MendoFEMA\".\"XSCutLines\" (geom) sql=', 'LAUNDER' : False, 'OPTIONS' : '', 'OVERWRITE' : True, 'PK' : 'id', 'PRECISION' : True, 'PRIMARY_KEY' : None, 'PROMOTETOMULTI' : True, 'SCHEMA' : 'public', 'SEGMENTIZE' : '', 'SHAPE_ENCODING' : '', 'SIMPLIFY' : '', 'SKIPFAILURES' : False, 'SPAT' : None, 'S_SRS' : None, 'TABLE' : 'XSCutLines180726v321viaGDAL', 'T_SRS' : None, 'WHERE' : '' } GDAL command: cmd.exe /C ogr2ogr.exe -progress --config PG_USE_COPY YES -f PostgreSQL PG:" host=127.0.0.1 port=5432 user='postgres' password='Ridgeview' active_schema=public " -lco DIM=2 C:/Users/loren/AppData/Local/Temp/processing_246b5b53088e4ae9ad8ceeab05118d35/80c5541d7ad249ebbbe6a8430c1df09c/INPUT.shp INPUT -overwrite -nlt LINESTRING -lco GEOMETRY_NAME=geom -lco FID=id -nln public.XSCutLines180726v321viaGDAL -a_srs EPSG:2226 -nlt PROMOTE_TO_MULTI GDAL command output: 0...10...20...30...40...50...60...70...80...90...100 - done. Execution completed in 0.72 seconds Results: {} Loading resulting layers Algorithm 'Import vector into PostGIS database (available connections)' finished --> But no new tables exist in public or anywhere else I can find, no new layers load into the project.   My research patience for today is exhausted. Does anyone know of a realistically simple way to create a backup of a QGIS layer that will be saved into an independent PostGIS table, that can be reloaded into the original project alongside the original layer and remain completely unaffected by edits to the original layer? 180731: I was wrong earlier about Processing -> Toolbox -> GDAL -> Import Vector into PostGIS database. It did make tables: QGIS Browser can't see them... But DB Manager can: I just tried again, and it rejects any of my rivergis schemas, only seems to work for user postgres and public there. Maybe I'm missing something?
gis.stackexchange.com
December 9, 2025 at 11:03 AM
Trying to use GDAL in Windows Apache WSGI with Python 3.9.5 from OSGeo4W
Not much is missing and I'm going crazy. I'm pulling my hair out to get GDAL running under WSGI in Windows Apache using a Python 3.9.5 Installation from OSGeo4W. I have installed QGIS 3.24.2 with GDAL 3.4.2 using osgeo4w-setup.exe. When I open the OSGeo4W Shell an run following Python lines of code, everything works as expected. But when I run the code in my WSGI Python application function, I get an error which tells me DLL load failed while importing _gdal. File "C:/OSGeo4W64/apps/qgis-web-client/wsgi/wmservice.py", line 61, in \r from osgeo import gdal,osr,ogr\r File "C:\\OSGeo4W64\\apps\\Python39\\lib\\site-packages\\GDAL-3.4.2-py3.9-win-amd64.egg\\osgeo\\__init__.py", line 45, in \r _gdal = swig_import_helper()\r File "C:\\OSGeo4W64\\apps\\Python39\\lib\\site-packages\\GDAL-3.4.2-py3.9-win-amd64.egg\\osgeo\\__init__.py", line 42, in swig_import_helper\r return importlib.import_module('_gdal')\r File "C:\\OSGeo4W64\\apps\\Python39\\lib\\importlib\\__init__.py", line 127, in import_module\r return _bootstrap._gcd_import(name[level:], package, level)\r ModuleNotFoundError: No module named '_gdal'\r mod_wsgi (pid=3444): Failed to exec Python script file 'C:/OSGeo4W64/apps/qgis-web-client/wsgi/wmservice.py'. mod_wsgi (pid=3444): Exception occurred processing WSGI script 'C:/OSGeo4W64/apps/qgis-web-client/wsgi/wmservice.py'. Traceback (most recent call last):\r File "C:\\OSGeo4W64\\apps\\Python39\\lib\\site-packages\\GDAL-3.4.2-py3.9-win-amd64.egg\\osgeo\\__init__.py", line 29, in swig_import_helper\r return importlib.import_module(mname)\r File "C:\\OSGeo4W64\\apps\\Python39\\lib\\importlib\\__init__.py", line 127, in import_module\r return _bootstrap._gcd_import(name[level:], package, level)\r File "", line 1030, in _gcd_import\r File "", line 1007, in _find_and_load\r File "", line 986, in _find_and_load_unlocked\r File "", line 666, in _load_unlocked\r File "", line 565, in module_from_spec\r File "", line 1173, in create_module\r File "", line 228, in _call_with_frames_removed\r ImportError: DLL load failed while importing _gdal: The specified procedure could not be found.\r \r During handling of the above exception, another exception occurred:\r \r Traceback (most recent call last):\r File "C:/OSGeo4W64/apps/qgis-web-client/wsgi/wmservice.py", line 61, in \r from osgeo import gdal,osr,ogr\r File "C:\\OSGeo4W64\\apps\\Python39\\lib\\site-packages\\GDAL-3.4.2-py3.9-win-amd64.egg\\osgeo\\__init__.py", line 45, in \r _gdal = swig_import_helper()\r File "C:\\OSGeo4W64\\apps\\Python39\\lib\\site-packages\\GDAL-3.4.2-py3.9-win-amd64.egg\\osgeo\\__init__.py", line 42, in swig_import_helper\r return importlib.import_module('_gdal')\r File "C:\\OSGeo4W64\\apps\\Python39\\lib\\importlib\\__init__.py", line 127, in import_module\r return _bootstrap._gcd_import(name[level:], package, level)\r ModuleNotFoundError: No module named '_gdal'\r Next you see an extract from my wmservice.py file (until gdal will be imported). # -*- coding: utf-8 -*- # set Environment variables import os,sys os.environ['PATH'] = 'C:\\OSGEO4W64\\bin;C:\\OSGEO4W64\\apps\\qgis\\bin;C:\\OSGEO4~1\\apps\\qt5\\bin;C:\\OSGEO4~1\\apps\\Python39\\Scripts;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\system32\\WBem' os.environ['PYTHONHOME'] = 'C:\\OSGeo4W64\\apps\\Python39' os.environ['PYTHONPATH'] = 'C:\\OSGeo4W64\\bin;C:\\OSGeo4W64\\apps\\qgis\\python;C:\\OSGeo4W64\\apps\\Python39;C:\\OSGeo4W64\\apps\\Python39\\Scripts;' os.environ['GDAL_FILENAME_IS_UTF8'] = 'YES' os.add_dll_directory(r'C:\OSGeo4W64\bin') os.environ['GDAL_DRIVER_PATH'] = r'C:\OSGEO4~1\bin\gdalplugins' os.environ['PYTHON_EGG_CACHE'] = r'D:\Python-Egg-Cache' os.environ['USE_PATH_FOR_GDAL_PYTHON'] = 'YES' sys.path.insert(0,'C:/OSGeo4W64/bin') sys.path.append('C:/OSGeo4W64/apps/Python39') sys.path.append('C:/OSGEO4W64/apps/qgis/bin') sys.path.append('C:/OSGeo4W64/apps/Python39/Scripts') sys.path.append('C:/OSGeo4W64/apps/qgis/python') sys.path.append('C:/Windows/system32') sys.path.append('C:/Windows') sys.path.append('C:/Windows/system32/WBem') os.environ['GDAL_LIBRARY_PATH'] = r'C:\OSGeo4W64\bin\gdal304.dll' os.environ['GEOS_LIBRARY_PATH'] = r'C:\OSGeo4W64\bin\geos_c.dll' ## Important !! set GDAL_DATA in global Windows Environment ## Unfortunately, setting it here does not help !! #os.environ['GDAL_DATA'] = r'C:\OSGEO4W64\share\gdal' os.environ['PROJ_LIB'] = r'C:\OSGEO4W64\share\proj' from osgeo import gdal,osr,ogr P.S.: I used os.environ and sys.path to set Windows PATH, because I didn't know which one will be used. I have absolutely no idea what's missing here. I checked all file permissions and even installed GDAL from Christoph Gohlke (https://www.lfd.uci.edu/~gohlke/pythonlibs), unfortunately without luck. Using Gohlkes installation, Python GDAL claims to have no PDF driver support, but gdalinfo.exe works without any problem. Maybe someone can shade some light on this?
gis.stackexchange.com
December 9, 2025 at 10:54 AM