Re: [Qgis-user] QGIS action to run a command in a terminal window on Windows

2024-05-07 Thread Ujaval Gandhi via QGIS-User
You can use the 'Execute SQL' algorithm from Processing Toolbox to run the SQL query. You can trigger any processing algorithm from an Action that will run on any platform. Example of how to run a processing algorithm from a Python Action 

Re: [Qgis-user] How QGIS handles on-the-fly projection?

2024-02-29 Thread Ujaval Gandhi via QGIS-User
There is specific code for QGIS to handle transformation between EPSG:3857 and EPSG:4326 due to EPSG:3857 not being valid at poles. See the comments at https://github.com/qgis/QGIS/blob/master/src/core/proj/ qgscoordinatetransform.cpp#L585

Re: [Qgis-user] Batch Processing Tool for Wedge Buffers

2024-02-11 Thread Ujaval Gandhi via QGIS-User
Should be possible. Use Autofill -> Calculate by _expression_ can build an _expression_ that takes the Layer (you have access to the current layer variable in _expression_ builder) and the Row number (rownumber variable) and get the attribute value of 'Azimuth' field. ---Ujaval GandhiSpatial

Re: [Qgis-user] Batch Processing Tool for Wedge Buffers

2024-02-11 Thread Ujaval Gandhi via QGIS-User
click 'Autofill' -> Add Values by _expression_ and use _expression_ generate_series(90, 270, 90)You will get 4 layers, one for each azimuth value. Use 'Merge Vector Layers' tool to merge them into a single layer.---Ujaval GandhiSpatial Thoughtswww.spatialthoughts.comOn Sun, Feb 11, 2024 at 3:25 AM

Re: [Qgis-user] Oriented Points

2023-11-27 Thread Ujaval Gandhi via QGIS-User
If you want to add the angle of the underlying road automatically, this is doable using aggregate() _expression_ to obtain the intersecting road sement and then obtaining the angle of the line using angle_at_vertex() function. You can set it up so it gets filled automatically as soon as you add

Re: [Qgis-user] Oriented Points

2023-11-27 Thread Ujaval Gandhi via QGIS-User
I see. If the angle is from a fixed reference point, you can add an _expression_ using azimuth() function in the Attribute Form that sets the default value of the attribute to the angle between the current point and the target point. If your reference point is not fixed but you need to select it

Re: [Qgis-user] Oriented Points

2023-11-27 Thread Ujaval Gandhi via QGIS-User
Just add an attribute for the rotation/orientation. You can visualize them using the technique shown here https://www.communityhealthmaps.org/blog/2019/02/21/mapping-field-photos-in-qgis---Ujaval GandhiSpatial Thoughtswww.spatialthoughts.comOn Mon, Nov 27, 2023 at 4:18 PM Huesmann, Michaela via

Re: [Qgis-user] Flatgeobuf in google drive ?

2023-10-06 Thread Ujaval Gandhi via QGIS-User
Google Drive doesn't allow static file hosting (it used to, but stopped around 2015). So you cannot use it to get a file URL that can be directly used to get the file contents. You'll need to host the file on a static file server or a cloud bucket (Google Cloud Storage or AWS s3) --- Ujaval

Re: [Qgis-user] how to count overlays of objects

2023-08-18 Thread Ujaval Gandhi via QGIS-User
If your goal is to have a heatmap of polygon overlaps - it's actually very simple. Use the Blending Mode to 'Multiply' for 'Features' and the layer will be rendered with darker colors at the regions of overlaps See the screenshot https://i.imgur.com/fcdB7h6.png

Re: [Qgis-user] Shifting a Geotiff image

2023-08-13 Thread Ujaval Gandhi via QGIS-User
Hi Grant - You can do this with a simple Linear transform using the built-in Georeferencer. I made a small video showing how https://www.youtube.com/watch?v=8a4M32Rkwck

Re: [Qgis-user] connect QGIS with python

2023-08-07 Thread Ujaval Gandhi via QGIS-User
You can install QGIS using conda [https://gisunchained.wordpress.com/2019/05/29/using-qgis-from-conda/] along with other required packages in the same environment. This is the easiest way to ensure python dependencies are found correctly. If this is not feasible for you, you can refer to the

Re: [Qgis-user] Add context menu to map canvas

2023-08-02 Thread Ujaval Gandhi via QGIS-User
Put the code block inside initGui(). Tested on a small plugin and worked fine https://pastebin.com/raw/U55Hbguk [https://mailtrack.io/trace/link/d204ab4d25292415574deaa5cfbfef567d34b153?url=https%3A%2F%2Fpastebin.com%2Fraw%2FU55Hbguk=8747767=26d638063caac0c3] --- Ujaval Gandhi Spatial Thoughts

Re: [Qgis-user] Python Problems

2023-08-01 Thread Ujaval Gandhi via QGIS-User
Looks like it is coming from qgis2web and relates to access to the file you are using. You already received a response to the same query before, so avoid posting the same question again without additional information.---Ujaval GandhiSpatial Thoughtswww.spatialthoughts.comOn Tue, Aug 1, 2023 at

Re: [Qgis-user] Editing expression in QGIS

2023-07-10 Thread Ujaval Gandhi via QGIS-User
You will need to write the expression using QGIS's expression syntax and functions. There's no direct migration from Excel to QGIS. You can add a new field using Field Calculator as a 'Virtual Field' which is computed dynamically, so if any data value changes or you add new rows, the expression

Re: [Qgis-user] Request for Guidance on Using 'Dissolve' Tool in QGIS with IUCN Data

2023-06-26 Thread Ujaval Gandhi via QGIS-User
There is Vector Geometry --> Aggregate algorithm in the Processing Toolbox that can summarize values while dissolving features. It can be a little tricky to use so if you can't figure out how to use it - see my tutorial https://www.qgistutorials.com/en/docs/3/areal_mean_rainfall.html

Re: [Qgis-user] Adding delimited text layer in QGIS using Geographical modeler- reg

2023-06-25 Thread Ujaval Gandhi via QGIS-User
You can use the “Create points layer from table” algorithm. On Sun, 25 Jun 2023 at 10:39 PM, Abhi Shek via QGIS-User < qgis-user@lists.osgeo.org> wrote: > Hi, > > Can you please suggest me how to add a delimited text layer in QGIS using > Geographical modeler. > Thanks in advance. > -- > with

Re: [Qgis-user] [pyqgis] create new raster

2023-05-09 Thread Ujaval Gandhi via QGIS-User
Instead of manually iterating over the raster, you can use the 'Raster Calculator' Algorithm to set the pixel values which will be much easier and will resolve your issues. Test it with the processing toolbox and then all via PyQGIS with the required parameters. I tested and the following

Re: [Qgis-user] self-learning resources

2023-04-26 Thread Ujaval Gandhi via QGIS-User
Hi Simon,I have a series of beginner-friendly tutorials in multiple languages at https://www.qgistutorials.com/. There's also several full-length courses at https://courses.spatialthoughts.com/---Ujaval GandhiSpatial Thoughtswww.spatialthoughts.comOn Wed, Apr 26, 2023 at 3:59 AM Phil Wyatt via

Re: [Qgis-user] QGIS under Arch-Linux

2023-02-16 Thread Ujaval Gandhi via QGIS-User
You can try installing using conda. The latest LTR and Current releases are available on conda-forge https://www.linkedin.com/posts/alexandre-neto-geo_qgis-activity-7030576968169336832-cwOm

Re: [Qgis-user] Convert an ALOS PALSAR DEM from ellipsoidal to geoid.

2023-01-02 Thread Ujaval Gandhi via QGIS-User
I have a blog post explaining how to do the conversion using GDAL https://spatialthoughts.com/2019/10/26/convert-between-orthometric-and-ellipsoidal-elevations-using-gdal On Tue, 3 Jan 2023 at 11:09 AM, Eddison Araya via QGIS-User < qgis-user@lists.osgeo.org> wrote: > Hi, thanks, skip previous

Re: [Qgis-user] multiple csv file import

2022-11-16 Thread Ujaval Gandhi via Qgis-user
Another option is to use the tool 'Create Points Layer from Table' tool from QGIS Processing Toolbox. This tool can read a CSV and create a point layer (i.e. shapefile). First test it on a single file and if it works for your use case, you can click the 'Run as a Batch Process' and run it on all

Re: [Qgis-user] Tectonic plate boundaries

2022-08-19 Thread Ujaval Gandhi via Qgis-user
Hi John, I think you may be working with a 'Line' layer so you can't fill the space between them. You should get a 'Polygon' layer, specifically the 'PB2002_plates' from the repository mentioned earlier. You can download it from 

Re: [Qgis-user] [QGIS-Developer] passing parameters to QGIS Python-Script started via Command Line

2022-08-08 Thread Ujaval Gandhi via Qgis-user
One option is to set env variables before launching the qgis command. The env variables can be read from python. set QGIS_MESSAGE=Helllo World Then your myscript.py can be something like from qgis.utils import iface import os message = os.environ['QGIS_MESSAGE']

Re: [Qgis-user] PyQGIS from non-bundled Python install?

2022-06-08 Thread Ujaval Gandhi via Qgis-user
Yes. Configuring system paths to point to qgis libraries will allow native python to work with pyqgis. I have a complete example for Mac which can be easily adapted for a linux based system. https://courses.spatialthoughts.com/pyqgis-in-a-day.html#writing-standalone-python-scripts [image: Logo]

Re: [Qgis-user] add strava heatmap to QGIS

2022-05-11 Thread Ujaval Gandhi via Qgis-user
Hi Hugh, I made it work successfully in QGIS. The URL needs slight tweaking as follows https://heatmap-external-a.strava.com/tiles-auth/all/hot/{z}/{x}/{y}.png?Key-Pair-Id=LONG_STRING Pro Tip: Use View -> Panels -> Debugging /Development Tools to see the network request that QGIS is sending

Re: [Qgis-user] help with shortest-path/network analysis (multiple origins to multiple destinations)

2022-05-06 Thread Ujaval Gandhi via Qgis-user
You need to do Distance Matrix. See https://www.qgistutorials.com/en/docs/3/origin_destination_matrix.html On Fri, 6 May 2022 at 7:33 PM, Francesca Parente via Qgis-user < qgis-user@lists.osgeo.org> wrote: > Thank you very much indeed Nicolas, for your inputs and all the suggested > materials! >

Re: [Qgis-user] geolocating a list of addresses

2022-03-04 Thread Ujaval Gandhi via Qgis-user
You mention your points are in Lat/Lon but your chosen CRS is UTM. That's the mismatch. If your point coordinates are in Latitude Longitude, choose EPSG:4326 WGS84 as your CRS when importing the CSV and it will line up. [image: Logo] Ujaval Gandhi Spatial Thoughts