Hi All,

Finally had time to look into this. Command line that works is as follows:

qgis --project f:\qgis\WorldMap.qgs --extent 
-119.270002,46.195891,-119.263714,46.200514

where: 
- extent parameters are xmin,ymin,xmax,ymax
- project CRS units must match extent coordinates

Loren

________________________________________
Loren Dawe - Senior Geomatics Specialist
Terra Remote Sensing Inc.
250.656.0931

-----Original Message-----
From: Mike Flannigan <[email protected]> 
Sent: Sunday, April 9, 2023 8:47 AM
To: Loren Dawe <[email protected]>
Subject: [External] [Qgis-user] Zoom QGIS to specific location by command line


How did this work out for you?
I am also interested in doing this.
Can you give an example command line argument?


Mike Flannigan
Houston, TX
281-286-6869
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mflan.com_index.htm&d=DwICaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=6kvQ62QVrK2dV679VmN7CpDFtHmnVuFuQc4Ctbq_t8g&m=att5eJv7IamuCPbAN0OsG41PFTY9IriFNdk43iuZwTc&s=QNfLA21Czc8jItUL6RO65kDnLm_IENx1IRNpVdP6wIQ&e=


On 4/5/23 14:00, [email protected] wrote:
> Date: Tue, 4 Apr 2023 23:51:14 +0000
> From: Loren Dawe<[email protected]> 
> To:"[email protected]"  <[email protected]>
> Subject: [Qgis-user] Zoom QGIS to specific location by command line 
> Message-ID:<[email protected]>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi,
> I would like to zoom QGIS to a specific location (lat/lon coordinate) or area 
> (lat/lon bounding box) using a command line argument generated outside of 
> QGIS. I have looked through the available command line arguments and cant see 
> anything that will allow this.
>
> Does anyone know of a method that this could be accomplished?
>
> I could generate a disk file containing the coordinates in any documented 
> format if that is a solution (tried to use the Google Earth plugin and send a 
> KML file but that doesn't work from the command line).
>
> QGIS 3.20.3
> Windows 10
>
> Thanks in Advance,
> Loren.

_______________________________________________
QGIS-User mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to