[Qgis-user] Help reading mesh layer from Postgresql

2024-05-21 Thread Jorge Gustavo Rocha via QGIS-User

Hi,

I would love to store netCDF files in Postgresql/PostGIS and read them 
as mesh layers.


I'm able to store netCDF in PostGIS and add it as a rasters in QGIS.

To store it on PostGIS:

raster2pgsql -s 4326 -d -I -C -M AZ1_HS_2023101200.nc -F 
public.az1_hs_2023101200 | psql service=atlantico


Check if it is ok:

gdalinfo "PG:service=atlantico schema='public' table=az1_hs_2023101200"

Load it in QGIS (as raster):

uri_config = {
    'service':'atlantico',
    'schema':'public',
    'table':'az1_hs_2023101200',
    'geometrycolumn':'rast'
}
md = QgsProviderRegistry.instance().providerMetadata('postgresraster')
uri = QgsDataSourceUri(md.encodeUri(uri_config))
rlayer = iface.addRasterLayer(uri.uri(False), "az1_hs_2023101200", 
"postgresraster")


I would like to load it as a mesh layer.

Loading a mesh from file works as expected.

mesh_layer_path: str = "/tmp/AZ1_HS_2023101200.nc"
mesh_layer = QgsMeshLayer(mesh_layer_path, "layer_name", "mdal")
if not mesh_layer.isValid():
    print("Layer failed to load!")
else:
    QgsProject.instance().addMapLayer(mesh_layer)

Is it possible to load it from PostGIS as a mesh? Should it be stored in 
another format?


I've tried this:

uri_config = {
    'service':'atlantico',
    'schema':'public',
    'table':'az1_hs_2023101200',
    'geometrycolumn':'rast'
}
md = QgsProviderRegistry.instance().providerMetadata('postgresraster')
uri = QgsDataSourceUri(md.encodeUri(uri_config))
mesh_layer = QgsMeshLayer(uri.uri(False), "layer_name", "mdal")
if not mesh_layer.isValid():
    print("Layer failed to load!")
else:
    QgsProject.instance().addMapLayer(mesh_layer)

Regards,

Jorge Gustavo




___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Moving many project files - bulk updating paths to tables?

2024-04-04 Thread Jorge Gustavo Rocha via QGIS-User

Hi Tony,

You can unzip the qgz file and change the text in the qgs files. qgs are 
text files. Afterwards, you can create the zip again with the qgz 
extension or open the qgs file directly.


I hope it helps,

Jorge

On 04/04/24 19:28, Tony Shepherd (FarmMaps NZ) via QGIS-User wrote:


Hi All

I am sure I am not the first to ponder how to deal with this.  I have 
loads, thousands likely, of project files in a series of folders and 
subfolders.  I need to move those files and folders to a new location 
to enable other staff to use the project files and their associated 
shp files, geo packages, rasters etc.


Essentially, I am shifting my entire collection of GIS work to a 
shared location for others to start using, so moving from a sole 
operator to a shared environment.


In my old MapInfo days, I would simply do a bulk search and replace 
over the workspace files (text-based so this is easy) and change the 
paths that need changing and all would be ok.


As qgz files are not easily modified through a text editor, are there 
any tools out there to enable bulk changing of file paths in those files?


Any other approaches?

Cheers

Tony

--

*Tony Shepherd*

/GeoSpatial Manager @ FarmMaps NZ & Photographer @ Shepherd Photos/

*/Phone/**–* 027 435 6193  | */Website/ – *shepherdphotos.co.nz 



*/Email/**– Maps*t...@farmmaps.nz   | 
*/Email/ – Photos* t...@shepherdphotos.co.nz 



*/Facebook/*TonyShepherdPhotos 



FM_logo1_small (Custom)


___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Atlas - Map series along linear object

2024-03-26 Thread Jorge Gustavo Rocha via QGIS-User

Hi Michaela,

You can use the tool "points along geometry" to create the coverage 
layer. Choose the correct distance based on your 1:500 scale (to show 
more or less overlapping areas). Then create the Atlas using such points 
(that you can hide them in the output). You can play with different 
distances.


I hope it helps,

Jorge

On 26/03/24 10:26, Huesmann, Michaela via QGIS-User wrote:


Hello,

I would like to create a series of maps using the atlas function and 
have already experimented and watched videos. What I'm still missing 
is an example of how I can create a series of maps along a linear 
object. E.g. a series of maps at a scale of 1:500 with sections along 
a street.


 1. How to prepare the covering layer along the road?

 2. Can I use the same layout, e.g. A3 landscape, for all partial maps
and rotate the sections so that they are placed as horizontally as
possible on the map frame? Then of course an automatically
adjusted north arrow is also necessary.

 3. Or is 2. not possible with rotation and I then have to choose
landscape or portrait format depending on the position of the
section in the north orientation? I can then probably use the
coverage layer to determine the vertical or transverse extent of
the section and then select the respective side orientation.

Who has experience with the atlas along a line object and can help me?

Thanks and best regards,

Michaela


Kreisstadt Steinfurt 

 - 48565 Steinfurt
www.steinfurt.de 

Mit freundlichen Grüßen
im Auftrag
MichaelaHuesmann
Geodaten
Fachdienst Tiefbau

Tel.: +49 2552 925 219
Fax:
E-Mail: michaela.huesm...@stadt-steinfurt.de 




Bitte denken Sie an die Umwelt, bevor Sie diese E-Mail ausdrucken.


___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Support for Mesh layers (netCDF) on Postgis/Postgresql: is it possible?

2023-12-14 Thread Jorge Gustavo Rocha via QGIS-User

Hi Saber,

Thank you for your feedback. You are an expert on the subject and I 
really appreciate your comments.


Postgresql is probably not the best option in terms of performance. But 
it is a practical solution to centralize all information in a single place.


I'm using postgis raster support, for example, which is not faster than 
files, but it is ok for my use cases. I have all the spatial data in one 
place, where I can manage authentication and authorizations quite well. 
The end user will use a cached WMTS/TMS service (MapProxy on top of QGIS 
Server), and the performance will be ok. I want to use QGIS Server to 
provide data in netCDF files as temporal layers. The end user will use 
cached data and will not notice any performance issues. The cache can be 
created once, since the data is always in the past. That's my use case: 
I'm not processing the data or making any processing. Just providing 
maps/tiles.


GDAL and QGIS works very well with Postgresql and users are familiar 
with Postgresql (setup and usage).


How difficult would be to have netCDF data in Postgresql?

1) We should have a way to store the data (and metadata) on the database 
(like we do with rasters, with raster2pgsql).


2) We need to improve QgsMeshLayer to read from a PG uri, like:

uri_config = {
    'service':'atlantico',
    'schema':'public',
    'table':'az1_hs_2023101200_03',
    'geometrycolumn':'rast'
}
uri_config = {key:val for key, val in uri_config.items() if val is not None}
md = QgsProviderRegistry.instance().providerMetadata('mdal')
uri = QgsDataSourceUri(md.encodeUri(uri_config))
mesh_layer = QgsMeshLayer(uri.uri(False), "layer_name", "mdal")

If you think this does not make sense, you are probably right :-) I'm 
quite new to netCDF data and I just want to use the tools I'm used to 
have with this format.


Regards,

Jorge

On 14/12/23 10:13, Saber Razmjooei wrote:

Hi Jorge,

What is your motivation for storing mesh data in PG? If you want to 
have fast access to large central datasets, PG is probably not a good 
storage option. Best to investigate Zarr (https://zarr.dev/) which is 
a cloud optimised format for large multidimensional datasets. We need 
to first implement it in MDAL for QGIS to be able to load the data 
effectively.


Another option to serve large NetCDF/GRIB data is to set up an EDR 
(https://ogcapi.ogc.org/edr/overview.html) service which we are adding 
support for it in QGIS.


Kind regards
Saber


On Wed, 13 Dec 2023 at 19:36, Jorge Gustavo Rocha via QGIS-User 
 wrote:


Hi,

I'm playing with netCDF files. I add them to QGIS using the mdal
provider (mesh layer). Reading netCDF data from files works very well.

My question is: is it possible to read netCDF data from
Postgis/Postgresql?

I can store netCDF files in Postgis using raster2pgsql, but the
data is
stored as raster and I can only open it as raster in QGIS and not as
mesh. Is works, but not as good as the mesh support.

I'm storing it, using something like this:

raster2pgsql -s 4326 -d -I -C -M AZ1_HS_2023101200.nc -F
public.az1_hs_2023101200 | psql service=atlantico

Thanks in advance,

Jorge Gustavo

___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user



--
Saber Razmjooei
www.lutraconsulting.co.uk <http://www.lutraconsulting.co.uk>
+44 (0)7568 129733___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] Support for Mesh layers (netCDF) on Postgis/Postgresql: is it possible?

2023-12-13 Thread Jorge Gustavo Rocha via QGIS-User

Hi,

I'm playing with netCDF files. I add them to QGIS using the mdal 
provider (mesh layer). Reading netCDF data from files works very well.


My question is: is it possible to read netCDF data from Postgis/Postgresql?

I can store netCDF files in Postgis using raster2pgsql, but the data is 
stored as raster and I can only open it as raster in QGIS and not as 
mesh. Is works, but not as good as the mesh support.


I'm storing it, using something like this:

raster2pgsql -s 4326 -d -I -C -M AZ1_HS_2023101200.nc -F 
public.az1_hs_2023101200 | psql service=atlantico


Thanks in advance,

Jorge Gustavo

___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] QGIS Server: Parsing WFS capabilites with JavaScript

2023-10-30 Thread Jorge Gustavo Rocha via QGIS-User

Hi Jakob,

You can try jsonix. I use something like:

var Jsonix = require('jsonix').Jsonix;
var XLink_1_0 = require('w3c-schemas').XLink_1_0;
var OWS_1_0_0 = require('ogc-schemas').OWS_1_0_0;
var OWS_1_1_0 = require('ogc-schemas').OWS_1_1_0;
var WFS_1_0_0 = require('ogc-schemas').WFS_1_0_0;
var WFS_1_1_0 = require('ogc-schemas').WFS_1_1_0;
var WFS_2_0 = require('ogc-schemas').WFS_2_0;
var Filter_1_0_0 = require('ogc-schemas').Filter_1_0_0;
var Filter_1_1_0 = require('ogc-schemas').Filter_1_1_0;
var Filter_2_0 = require('ogc-schemas').Filter_2_0;
var GML_1_0_0 = require('ogc-schemas').GML_1_0_0;
var GML_2_1_2 = require('ogc-schemas').GML_2_1_2;
var GML_3_1_1 = require('ogc-schemas').GML_3_1_1;
var GML_3_2_0 = require('ogc-schemas').GML_3_2_0;
var GML_3_2_1 = require('ogc-schemas').GML_3_2_1;
var SMIL_2_0 = require('ogc-schemas').SMIL_2_0;
var SMIL_2_0_Language = require('ogc-schemas').SMIL_2_0_Language;
var CSW_2_0_2 = require('ogc-schemas').CSW_2_0_2;
var DC_1_1 = require('ogc-schemas').DC_1_1;
var DCT = require('ogc-schemas').DCT;
var XMLSchema = require('./mappings/XMLSchema').XMLSchema;

var context = new Jsonix.Context([
  XLink_1_0,
  OWS_1_0_0,
  OWS_1_1_0,
  WFS_1_0_0,
  WFS_1_1_0,
  WFS_2_0,
  Filter_1_0_0,
  Filter_1_1_0,
  Filter_2_0,
  GML_1_0_0,
  GML_2_1_2,
  GML_3_1_1,
  GML_3_2_0,
  GML_3_2_1,
  SMIL_2_0,
  SMIL_2_0_Language,
  CSW_2_0_2,
  DC_1_1,
  DCT,
  XMLSchema
]);
var unmarshaller = context.createUnmarshaller();

Later, you can transform WFS response to JSON, like:

    const response = responseBuffer.toString('utf8');
    var result = unmarshaller.unmarshalString(response);

Not so easy, but it works.

Regards,

Jorge Gustavo

On 30/10/23 14:11, Jakob Miksch via QGIS-User wrote:


Dear QGIS Server people,

I have a QGIS Server running. I would like to access the WFS 
Capabilities with JavaScript, more specifically I would like to know 
which WFS layers are published by QGIS Server. Unfortunately, QGIS 
Server only supports WFS 1.0.0 and 1.1.0. But the only parser for WFS 
capabilities I have found only support WFS 2.0.0 ( 
https://github.com/GastonZalba/ol-wfs-capabilities ).


Does anyone have a hint how to parse the WFS Capabilities from QGIS 
Server with JavaScript?


best regards,
Jakob





Jakob Miksch
Consultant

+49 170 9036956
siticom.online



	siticom GmbH • Werner-von-Siemens-Straße 2-6 • 76646 Bruchsal • 
Deutschland

Geschäftsführer: Jürgen Hatzipantelis, Stefan Höltken
Sitz der Gesellschaft: Weiterstadt • Amtsgericht Darmstadt • HRB 9276
Umsatzsteuer-ID Nr.: DE 197 925 589



___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Ajuda: Erro python

2023-06-01 Thread Jorge Gustavo Rocha via QGIS-User

Oi Fernanda,

Parece um problema com um módulo rastervision que vc instalou.

1) Tente desinstalar esse módulo ou

2) Abra um outro QGIS indo ao menu Settings → User profiles → New profile...

Boa sorte,

Gustavo

On 01/06/23 17:27, Fernanda Pimenta via QGIS-User wrote:

Prezados (as),

Utilizo a versão 3.28.6. (Firenze) do Qgis e estou tendo uma sequência 
de erros relacionado ao python,  apresentado abaixo:


1° - Logo ao abrir o software a janela com as seguintes informações é 
aberta:


Impossível carregar complemento 'rastervision_qgis' Devido a um erro 
ao chamar o método Class Factory().



  ModuleNotFoundError: No module named 'rastervision'

Traceback (most recent call last):   File 
"C:\PROGRA~1/QGIS32~1.6/apps/qgis-ltr/./python\qgis\utils.py", line 
423, in _startPlugin     plugins[packageName] = 
package.classFactory(iface)   File 
"C:\Users/Fernanda/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\rastervision_qgis\__init__.py", 
line 30, in classFactory     from .raster_vision import 
RasterVisionPlugin   File 
"C:\PROGRA~1/QGIS32~1.6/apps/qgis-ltr/./python\qgis\utils.py", line 
888, in _import     mod = _builtin_import(name, globals, locals, 
fromlist, level)   File 
"C:\Users/Fernanda/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\rastervision_qgis\raster_vision.py", 
line 27, in     from .registry import Registry   File 
"C:\PROGRA~1/QGIS32~1.6/apps/qgis-ltr/./python\qgis\utils.py", line 
888, in _import     mod = _builtin_import(name, globals, locals, 
fromlist, level)   File 
"C:\Users/Fernanda/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\rastervision_qgis\registry.py", 
line 1, in     import rastervision as rv   File 
"C:\PROGRA~1/QGIS32~1.6/apps/qgis-ltr/./python\qgis\utils.py", line 
888, in _import     mod = _builtin_import(name, globals, locals, 
fromlist, level) ModuleNotFoundError: No module named 'rastervision'



Versão do Python: 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) 
[MSC v.1928 64 bit (AMD64)]

Versão do QGIS: 3.28.6-Firenze Firenze, 868c9fa03b


Caminho do Python:

  * 
C:\Users/Fernanda/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\TocTable-main
  * 
C:\Users/Fernanda/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\raster_quantilizer
  * C:/PROGRA~1/QGIS32~1.6/apps/qgis-ltr/./python
  * C:/Users/Fernanda/AppData/Roaming/QGIS/QGIS3\profiles\default/python
  * C:/Users/Fernanda/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
  * C:/PROGRA~1/QGIS32~1.6/apps/qgis-ltr/./python/plugins
  * C:\PROGRA~1\QGIS32~1.6\apps\grass\grass82\etc\python
  * C:\Users\Fernanda\Documents
  * C:\Program Files\QGIS 3.28.6\bin\python39.zip
  * C:\PROGRA~1\QGIS32~1.6\apps\Python39\DLLs
  * C:\PROGRA~1\QGIS32~1.6\apps\Python39\lib
  * C:\Program Files\QGIS 3.28.6\bin
  * C:\PROGRA~1\QGIS32~1.6\apps\Python39
  * C:\PROGRA~1\QGIS32~1.6\apps\Python39\lib\site-packages
  * C:\PROGRA~1\QGIS32~1.6\apps\Python39\lib\site-packages\win32
  * C:\PROGRA~1\QGIS32~1.6\apps\Python39\lib\site-packages\win32\lib
  * C:\PROGRA~1\QGIS32~1.6\apps\Python39\lib\site-packages\Pythonwin
  * C:/Users/Fernanda/AppData/Roaming/QGIS/QGIS3\profiles\default/python
  * 
C:\Users\Fernanda\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\HCMGIS/forms
  * .
  * 
C:\Users/Fernanda/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\vrtbuilderplugin
  * 
C:\Users\Fernanda\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\vrtbuilderplugin\vrtbuilder


Como posso solucionar esse erro? Aguardo retorno.
Obrigada desde já.

Fernanda.

___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user


--
Jorge Gustavo Rocha
Geomaster, LDA
"Take the open source journey with us"

VAT/NIF: PT 510 906 109
Phone: +351 253 257 173 (landline)
Mobile: +351 910 333 888 (cellular)

Rua Afonso Palmeira, 31, 7 D
4715-278 Braga
PORTUGAL
GPS 41.54627, -8.40432
___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] WMTS via QGIS Server

2023-04-24 Thread Jorge Gustavo Rocha via QGIS-User

Hi Christoph,

The WMTS service provide tiles. It does not provide a file system access 
to the tiles.


If you want to have the tiles on the file system, you need to use a 
caching software do support such workflow. You can do that with a QGIS 
Server plugin or using a cache software, like MapProxy. I use MapProxy 
with QGIS Server and this software stack runs smoothly. Such kind of 
software allows you to define policies regarding tile updating.


Regards,

Jorge Gustavo

On 24/04/23 09:53, Christoph Jung via QGIS-User wrote:

Hello everyone,

The documentation of QGIS Server is excellent, but unfortunately I did not 
found the information, where the QGIS Server stores the requested tiles of a 
published WMTS and how long the requested tiles will be not removed/updated or 
something else. Does anybody have experience with WMTS served via QGIS Server 
and knows, where the tiles will be located and how long they will exist?

Best regards,
Christoph
___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


--
Jorge Gustavo Rocha
Geomaster, LDA
"Take the open source journey with us"

VAT/NIF: PT 510 906 109
Phone: +351 253 257 173 (landline)
Mobile: +351 910 333 888 (cellular)

Rua Afonso Palmeira, 31, 7 D
4715-278 Braga
PORTUGAL
GPS 41.54627, -8.40432

___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Check Geometries Plugin - attribute value in results

2023-03-29 Thread Jorge Gustavo Rocha via QGIS-User

Hi Totò,

There are two constrains related do sliver polygons:
- Maximum thinness
- Max. area

The value should be the one failing the condition for the feature. Can 
be one of the two. The enum ValueType (defined in 
src/analysis/vector/geometry_checker/qgsgeometrycheckerror.cpp) is not 
exposed, so there is no explicit information about it.


I hope it helps.

Jorge

On 29/03/23 08:22, Totò Fiandaca via QGIS-User wrote:

What does the real value of Sliver polygon represent?
- it's not the area of the polygon
- it's not the perimeter
- is not the area of the bounding box

so I ask if anyone can tell me what it represents, I can't find 
anything useful in the documentation.



Thank you

plugin: 
https://docs.qgis.org/3.28/en/docs/user_manual/plugins/core_plugins/plugins_geometry_checker.html#geometry-checker-plugin


--
*Ing. Salvatore Fiandaca*
*mobile*.:+39 327.493.8955
*m*: *pigrecoinfin...@gmail.com *
*C.F*.: FNDSVT71E29Z103G
*P.IVA*: 06597870820
*membro QGIS Italia - http://qgis.it/*
*socio GFOSS.it - *http://gfoss.it/
*member OSGeo* - *https://www.osgeo.org/member/fiandaca/* 


*blog:** https://pigrecoinfinito.com/ 
FB: Co-admin - 
https://www.facebook.com/qgis.it/** *

*TW:**https://twitter.com/totofiandaca*

43°51'0.54"N  10°34'27.62"E - EPSG:4326

“Se la conoscenza deve essere aperta a tutti,
perchè mai limitarne l’accesso?”
R. Stallman

Questo documento, allegati inclusi, contiene informazioni di proprietà 
di FIANDACA SALVATORE e deve essere utilizzato esclusivamente dal 
destinatario in relazione alle finalità per le quali è stato ricevuto. 
E' vietata qualsiasi forma di riproduzione o divulgazione senza 
l'esplicito consenso di FIANDACA SALVATORE. Qualora fosse stato 
ricevuto per errore si prega di informare tempestivamente il mittente 
e distruggere la copia in proprio possesso.




___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user


--
Jorge Gustavo Rocha
Geomaster, LDA
"Take the open source journey with us"

VAT/NIF: PT 510 906 109
Phone: +351 253 257 173 (landline)
Mobile: +351 910 333 888 (cellular)

Rua Afonso Palmeira, 31, 7 D
4715-278 Braga
PORTUGAL
GPS 41.54627, -8.40432
___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Qgis server : install on Linux Debian

2023-03-23 Thread Jorge Gustavo Rocha via QGIS-User

Hi,

You are using curl on the command line. You need to protect the url 
between quotes.


Can you try again with quotes around the URL?

Regards,

Jorge

On 23/03/23 14:06, celati Laurent via QGIS-User wrote:

Good morning,
Thanks a lot for your message.

I uninstalled everything I had installed up to now (from the Debian 
repository)  which only offered the qgis server 3.10 version.
I added the official qgis repository which allowed to install the 
version of qgis server 3.30. For information,  the qgis project that I 
am trying to serve is version 3.28 and not 3.30.

This is the current error message I am getting now:

/ curl 
http://SERVEUR_NAME/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS=1.3.0=GetCapabilities 


[1] 395943
[2] 395944
root@SERVEUR_NAME:/home/qgis/projects# encoding="UTF-8"?>
http://www.opengis.net/ogc; 
version="1.3.0">
  Please add or check 
the value of the REQUEST parameter


^C
[1]- Done curl 
http://SERVEUR_NAME/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS 


[2]+ Finished VERSION=1.3.0
/
Do you know what is the request parameter within the URL ?
Someone can help me? Thanks a lot.

Le ven. 17 mars 2023 à 13:08, celati Laurent 
 a écrit :


Good afternoon,
First, thank you so much for your replies.
I'm trying to give additional/updated inputs.
I confirm to you that i installed the server thanks to a `apt
install qgis-server` command.
Please read the results when i tape this command :
/root@xx:/etc/apache2/sites-available# dpkg -s qgis-server
Package: qgis-server
Status: install ok installed
Priority: optional
Section: science
Installed-Size: 9019
Maintainer: Debian GIS Project

Architecture: amd64
Source: qgis
Version: 3.10.14+dfsg-1
Replaces: qgis-mapserver
Provides: qgis-mapserver
Depends: python3-qgis (= 3.10.14+dfsg-1), qgis-providers (=
3.10.14+dfsg-1), libc6 (>= 2.29), libexiv2-27 (>= 0.27.3),
libfcgi0ldbl (>= 2.4.2), libgcc-s1 (>= 3.0), libqgis-core3.10.14
(>= 3.10.2), libqgis-server3.10.14 (>= 3.10.2), libqt5core5a (>=
5.15.1), libqt5gui5 (>= 5.3.0) | libqt5gui5-gles (>= 5.3.0),
libqt5webkit5 (>= 5.212.0~alpha3), libqt5widgets5 (>= 5.0.2),
libqt5xml5 (>= 5.0.2), libstdc++6 (>= 5.2)
Conflicts: qgis-mapserver
Description: QGIS server providing various OGC services
 QGIS is a Geographic Information System (GIS) which manages,
analyzes and
 display databases of geographic information.
 This package contains the QGIS server.
Homepage: https://qgis.org//
/
/
Regarding the debian version installed :
lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye


Within the qgis.demo.conf, i took the liberty to change the IP
value of the server by the name of the server.
Then :
root@XX:/etc/apache2/sites-available# a2ensite 
ERROR: Site XX does not exist!
Then. After a restart of Apache. I get this error message :
root@X:/etc/apache2/sites-available# curl
.fr/cgi-bin/qgis_mapserv.fcgi
Project file error

Thanks a lot for your help.

Le mer. 15 mars 2023 à 20:28, Aguilar Bolivar, Rosa (UT-ITC)
 a écrit :

Hi,

There is a helpful material at:
https://github.com/elpaso/qgis3-server-vagrant,

Also a docker container image
at:https://github.com/elpaso/qgis-server-docker.

Perhaps you could use this material as a starting point.

Hope this helps.

Best,

Rosa

-

Dr. Rosa Aguilar

University of Twente

Faculty of Geoinformation Science and Earth Observation

Connect with me on LinkedIn


https://rosaguilar.github.io __

-

The essential is invisible to the eye. Saint-Exupéry

*From:*QGIS-User  *On
Behalf Of *celati Laurent via QGIS-User
*Sent:* Wednesday, March 15, 2023 4:23 PM
*To:* qgis-user 
*Subject:* [Qgis-user] Qgis server : install on Linux Debian

Good afternnon,


I want to install Qgis server on my Linux Debian server
virtual .For now, it's not working.
FYI, I already have a working apache server and used for
geoserver and geonetwork.

I followed the Qgis server doc/tutorial:


https://docs.qgis.org/3.22/en/docs/training_manual/qgis_server/install.html


Re: [Qgis-user] Problems with transformation including height values

2023-03-21 Thread Jorge Gustavo Rocha via QGIS-User

Hi Bo,

I think you can do it with cs2cs. cs2cs can read a file.

As an example, the first coordinates seems to be transformed with:

echo 55 12 42 | cs2cs --3d epsg:4326 epsg:7416
691875.63    6098907.83 4.39

Regards from south,

Jorge

On 21/03/23 10:06, Bo Victor Thomsen via QGIS-User wrote:


Hi list -

I have a problem with transforming a csv file containing x,y /and /z 
values from EPSG:4326 to EPSG:7416, i.e I want to transform the height 
value from LongLat/ WGS84 ellipsoid height to UTM32/Etrs89 with 
vertical reference DVR90.


The file look like this:

*== data.csv, EPSG:4326 id: col1, x: col3, y: col2, z: col4 ==**
*a;55.0;12.0;42.0
b;55.05;12.0;43.0
c;55.10;12.0;44.0
d;55.15;12.0;45.0
e;55.20;12.0;46.0
*===*

*Step 1*: I import the file into QGIS using the Data Source Manager 
--> "Delimited Text" and define the projection to be EPSG:4326 /and/ 
to include z values. This works and the points are shown on my map 
where I expect them to be (Somewhere in the middle of Zealand, Denmark)


*Step 2*: I export the layer as a geojson file using "Export" --> 
"Save features as.." from the layer manager and choose EPSG:7416 
(UTM32/ETRS89 with DVR90 as vertical reference. And to include z-values


The resulting file looks like this:

*== data.geojson, EPSG:7416 ==**
*{
"type": "FeatureCollection",
"name": "data",
"crs": { "type": "name", "properties": { "name": 
"urn:ogc:def:crs:EPSG::4979" } },

"features": [
{ "type": "Feature", "properties": { "field_1": "a", "field_2": 55.0, 
"field_3": 12.0, "field_4": 42.0 }, "geometry": { "type": "Point", 
"coordinates": [ 12.0, 55.0, 42.0 ] } },
{ "type": "Feature", "properties": { "field_1": "b", "field_2": 55.05, 
"field_3": 12.0, "field_4": 43.0 }, "geometry": { "type": "Point", 
"coordinates": [ 12.0, 55.05, 43.0 ] } },
{ "type": "Feature", "properties": { "field_1": "c", "field_2": 55.1, 
"field_3": 12.0, "field_4": 44.0 }, "geometry": { "type": "Point", 
"coordinates": [ 12.0, 55.1, 44.0 ] } },
{ "type": "Feature", "properties": { "field_1": "d", "field_2": 55.15, 
"field_3": 12.0, "field_4": 45.0 }, "geometry": { "type": "Point", 
"coordinates": [ 12.0, 55.15, 45.0 ] } },
{ "type": "Feature", "properties": { "field_1": "e", "field_2": 55.2, 
"field_3": 12.0, "field_4": 46.0 }, "geometry": { "type": "Point", 
"coordinates": [ 12.0, 55.2, 46.0 ] } }

]
}
*===*

The new file is shown in my map exactly on top of the original point 
layer, meaning the horizontal projection is accurate. However, my z 
coordinates are not reprojected to the new vertical reference. All the 
z-values are exactly the same as the values in the .csv - file.


After some digging through Google and other places, I discover that 
EPSG:4326 /doesn't/ have a z component. Surprise ! You have to use 
EPSG:4979, which is the same as EPSG:4326 with ellipsoid height.


But, /after /repeating *step 1*, /but/ using EPSG:4979 as CRS during 
import, and subsequently repeating *step 2*, I get the exact same 
result: No transformation of height values.


So, what is not working ? Am I doing something wrong ?? Or is QGIS 
incapable of transforming z values ???



--
Med venlig hilsen / Best regards

Bo Victor Thomsen

___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user


--
Jorge Gustavo Rocha
Geomaster, LDA
"Take the open source journey with us"

VAT/NIF: PT 510 906 109
Phone: +351 253 257 173 (landline)
Mobile: +351 910 333 888 (cellular)

Rua Afonso Palmeira, 31, 7 D
4715-278 Braga
PORTUGAL
GPS 41.54627, -8.40432
___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] [EXTERNAL] Re: Geopackage slow on NAS if not read-only

2023-03-16 Thread Jorge Gustavo Rocha via QGIS-User

Hi,

For data storage and manipulation databases are suitable. Files are not.

Geopackages are wonderful to transfer data between systems or to archive 
an entire project (snapshot of data, styles and the project itself).


Regards,

Jorge

On 16/03/23 11:30, Árni Geirsson via QGIS-User wrote:
Thank you Jarosław. Isn't it strange that this was discussed 5 years 
ago and SMB file sharing is very common? Would a linux based NAS be 
able to use another protocol? What are my options for file based data 
sharing in QGIS? Abandoning geopackages is not a realistic option for 
me, but I could get a different kind of NAS unit, if that helps, what 
kind then? What amazes me is how little I see this discussed. There 
was a message in this thread this morning from Thomas Struller, but I 
am not sure it is about the same root problem, maybe Thomas can 
elaborate.
Should this perhaps be discussed in another forum, closer to the 
development of geopackage/sqlite?


Árni Geirsson

On Thu, 16 Mar 2023 at 09:52, Sadowski Jarosław 
 wrote:


Long story short: gpkg is bad idea for network drives as SMB/NAS etc

Sources:
Write-Ahead Logging (sqlite.org)


writing gpkg and sqlite on samba shares fails · Issue #628 ·
r-spatial/sf · GitHub 


*_*

*Jarosław Sadowski*
Kierownik Zespołu ds. Ochrony Środowiska |/Biuro Strategii i
Planowania, Projektowania i Inżynierii Podprogramu Kolejowego/
/Environmental Protection Team Leader //| Railway Subprogramme
Strategy & Planning, Design & Engineering Department/
e: jaroslaw.sadow...@cpk.pl
m: +48 532 720 230

Centralny Port Komunikacyjny Sp. z o.o. z siedzibą w Warszawie,
Aleje Jerozolimskie 142B, 02-305 Warszawa; nr KRS 759991, Sąd
Rejonowy dla m.st . Warszawy, XII Wydział Gospodarczy
Krajowego Rejestru Sądowego; NIP 701-08-94-497; REGON 381918620;
kapitał zakładowy 1.277.500.000,00 zł
Administratorem danych osobowych przekazanych przez Panią/Pana
m.in. w korespondencji mailowej jest Centralny Port Komunikacyjny
Sp. z o.o. z siedzibą w Warszawie. Przetwarzamy dane osobowe
zgodnie z przepisami ogólnego rozporządzenia o ochronie danych
(RODO), więcej informacji na ten temat znajduje się w zakładce
Polityka Prywatności oraz w Klauzuli informacyjnej na stronie
internetowej www.cpk.pl .
Treści zawarte w niniejszej wiadomości i załącznikach do niej
stanowią Tajemnicę Przedsiębiorstwa w rozumieniu ustawy z dnia 16
kwietnia 1993 r. o zwalczaniu nieuczciwej konkurencji. Jeśli
otrzymałeś tę wiadomość przez pomyłkę, bezzwłocznie skontaktuj się
z nadawcą wiadomości oraz usuń jej treść.
Centralny Port Komunikacyjny Sp. z o.o. with headquarters in
Warsaw, Aleje Jerozolimskie 142B, 02-305 Warsaw; KRS No.
759991, District Court for the Capital City of Warsaw, 12th
Commercial Department of the National Court Register; NIP
701-08-94-497; REGON 381918620; share capital of PLN 1.277.500.000,00.
The personal data controller of the personal data provided by you,
among others, in the e-mail correspondence, is Centralny Port
Komunikacyjny Sp. z o. o. based in Warsaw. The personal data is
processed by us in accordance with the provisions of the General
Data Protection Regulation (GDPR), for further information please
read the Privacy Policy tab and the Information Clause on the
www.cpk.pl website.
The content of this message and its attachments constitute the
Business Secret within the meaning of the Act of 16 April 1993 on
combating unfair competition. If you received this message by
mistake, contact the sender of the message immediately and delete
its content

*From:*QGIS-User  *On Behalf Of
*Árni Geirsson via QGIS-User
*Sent:* Thursday, March 16, 2023 10:18 AM
*To:* jhubbsl...@att.net
*Cc:* qgis-user@lists.osgeo.org
*Subject:* [EXTERNAL] Re: [Qgis-user] Geopackage slow on NAS if
not read-only

UWAGA: Ta wiadomość pochodzi spoza CPK Sp. z o.o. Proszę pomóż
zadbać o bezpieczeństwo naszej organizacji. Zastanów się, zanim
otworzysz link lub załącznik.

Yes, as far as I know, the NAS unit uses SMB as the file sharing
protocol. I used another NAS from QNAP before this one, also using
SMB and with the same problem. I thought pretty much all of the
Linux based NAS units were using SMB and if that is the problem,
it should be widespread, but I don't see any signs of that. Is SMB
a problem for geopackage?

I did a quick test in QGIS: A dataset of 178.000 line features is
rendered in about 1 second from a read only geopackage. When I
remove the read only flag, it is rendered in about 5 seconds.

If I store the geopackage on the local hard drive, the problem
disappears, 

Re: [Qgis-user] How to count number of layers loaded in layer panel of QGIS

2023-03-15 Thread Jorge Gustavo Rocha via QGIS-User

Hi Paul,

Run this on the Python console:

len(QgsProject.instance().mapLayers())

Best regards,

Jorge Gustavo

On 15/03/23 07:42, Paul N via QGIS-User wrote:
I want to count number of layer loaded. How to count number of layers 
loaded in layer panel of QGIS.


Regards.

Paul N

___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


--
Jorge Gustavo Rocha
Geomaster, LDA
"Take the open source journey with us"

VAT/NIF: PT 510 906 109
Phone: +351 253 257 173 (landline)
Mobile: +351 910 333 888 (cellular)

Rua Afonso Palmeira, 31, 7 D
4715-278 Braga
PORTUGAL
GPS 41.54627, -8.40432

___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Add application_name=QGIS to postgis connection string

2022-06-30 Thread Jorge Gustavo Rocha via Qgis-user

Hi Toni,

It makes sense to have in all connections to the database. The 
application_name is already used by QGIS Server.


To have it in QGIS desktop (from core), a few edits must be made to make 
it happen. Maybe there are plug


Can you add this a new feature request?

Regards,

Jorge

On 30/06/22 10:47, Toni Schönbuchner via Qgis-user wrote:

Hi all,

my QGIS project is saved in postgres/postgis. The database instance 
exists of 2 databases in
replication mode (primary, hot standby). Where hot standby is 
readonly. Before them pgpool2
acts as a load balancer where /WRITE/ only goes to primary and 
/SELECT/ queries go to both.


My Problem now is, that QGIS uses

SELECT pg_is_in_recovery();

to detect if the database is readonly and if so, editing will be locked.
Now whenever the connection is establish from the load balancer with 
slave (as it sees a SELECT)

QGIS thinks it cannot write, which is wrong in this situation.

After advice from a pgpool2 developer I would now force all requests 
coming from QGIS to primary
only (and allow other clients like dbeaver to use the load balancing 
feature.).


The way to do this on side of pgpool2 is to catch the application name:
app_name_redirect_preference_list = 'QGIS:primary'

I can further already see that QGIS sets a var in postgresql logs.


Connection matched pg_hba.conf line 94: "host all all 10.201.249.4/32 
scram-sha-256

2022-06-30 09:54:40.056 CEST [822446] toni@spatial_db LOG:  statement: SET 
application_name='QGIS'


The problem here is, that this var is set _after_ the connection is 
established,

where I need to set it in the „startup packet“.

My question is, is there some way to tell QGIS to use a connection 
string like:

postgresql://10.201.249.2:5432/spatial_db*?application_name=QGIS*

Or by use of some environment variable?


Thanks a lot for any help,

Toni



___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Help with scales in print layouts for geographic CRS

2022-04-07 Thread Jorge Gustavo Rocha via Qgis-user

Hi,

Thanks to Greg, Patrick, Nicolas and Nyall for the good discussion.

I never used lat/lon based layouts before and the result can be odd. I 
was trying to make it work, but it is not easy. The layout must include 
a warning about the difference in scales along the axes.


As Nyall said, additional logic could be added to detect scale changes 
along different directions. That introduces newer configurable 
parameters to decide the percentage of change to warn the users.


I think that it would be enough to warn users when they start a layout 
with a lat/lon coordinate system. The warning can be as simple as: 
"Please consider the usage of a projected CRS for your layout. Be aware 
that lat/lon printed maps can have different scales on the x and y axes.".


Regards,

Jorge

On 07/04/22 02:51, Nicolas Cadieux via Qgis-user wrote:


Hi Nyall,

That would be a "nice to have"!

Nicolas

On 2022-04-06 9:13 p.m., Nyall Dawson via Qgis-user wrote:

On Thu, 7 Apr 2022 at 10:26, Greg Troxel  wrote:


Nyall Dawson  writes:


In all cases (projected OR geographic) the scalebar logic is:

1. Create a horizontal line across the width of the layout map
2. Calculate the length of that line using great circle/ellipsoidal
calculations, based on the project's ellipsoid settings.
3. Compare the length of the ellipsoidal line vs the map width to
calculate the corresponding scale

That is a very straightforward approach with easy-to-understand
semantics.


So qgis scalebar calculations are ALWAYS based on great
circle/ellipsoidal lengths*.

And more precisely, a true geodesic between two points varying in x and
with constant y in the layout CRS.  For north-up (at least ish)
projections, that means a line of constant latitude.

For a lat/lon CRS in the layout, at mid latitudes, it's going to mean
that the scale in the y axis is smaller by about 110km/70km; a 
square in

lat/lon is taller than it is wide (and plus it's not a square, but
that's less obvious).  Equivalently, a square on the ground has a 
larger

difference in longitude than it does in latitude.  Or maybe I have that
backward, but using lat/lon in a layout does not preserve shapes.

This is what I was trying to get at: a single concept of scale is 
really
only valid for a projection that has the same scale in x and y.  
Which I

think is true iff the projection is conformal.  And it's only truly
valid if the scale doesn't change over the layout, which is probably
~never exactly true, but many projections aim to have it remain close
enough to be treated as constant (e.g. UTM).

Which is a long way of getting around to "if you are using lat/lon as
the axes in your layout, either you are doing something odd on purpose
or you probably should rethink your approach."  If you really do mean
it, I would find the explanation of why interesting.

All correct, indeed!

I've been thinking about introducing a new warning when exporting
layouts, which would look something like this:

1. For each scale bar, look at the referenced map
2. Measure the scale using multiple lines, each across the
top/middle/bottom horizontally and left/center/right vertically
3. Compare these scale values, and if any differ by more than XXX %
then show a warning to the user. Something like "The scale for map 1
varies from 1: to 1:y across different parts of the map.
Consider using an alternative form of representing the map scale (such
as a grid overlay), as the scale bar may be misleading for this map."

What do you think?

Nyall



* Unless the project itself is set to not use ellipsoidal calculations
and only use planar calculations, in the project properties dialog

Presumably those calculations are in the project CRS's xy space, and
would typically (when used sensibly) be grid distance in UTM, some 
State

Plane Coordinate System, or similar.

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user



___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Help with scales in print layouts for geographic CRS

2022-04-06 Thread Jorge Gustavo Rocha via Qgis-user

Hi,

Thank you all for the comments.

As far as I can see from my tests, the behavior is not related with the 
CRS in use. I've used more than one meter based projection to make sure 
the areas were fine. I use the advanced digitizing tools to create 
segments with the exact distance. Using projected CRS, the layouts are 
always fine.


The problem is related to the map area calculated for a giving scale, in 
the composer, when a lat/long coordinate system is in use.


If I make a very simple calculation of the area to render at a giving 
scale, my calculations work fine.


The width does not depend on the latitude, and should be:

layout_width_mm * scale / 1000.0

The height depends on the latitude. To compute it, I use the cosine of 
the latitude:


cosine = cos( center_latitude * PI / 180 );

layout_height_mm * scale / 1000.0 / cosine;

Based on this simple math, after converting these distances to lat/log, 
I can compute the "correct" ( ie expected) extend of the map in the 
layout. If I setup this extent manually, it works fine.


But the extent calculated by QGIS is different. I'll have to check the 
code to see why the logic if different from this one. Probably I am 
simplifying the calculations too much.


I'll return back after reading the code.

Regards,

Jorge Gustavo

On 06/04/22 15:10, Greg Troxel via Qgis-user wrote:

Patrick Dunford via Qgis-user  writes:


On 6/04/22 11:34, Greg Troxel via Qgis-user wrote:

Jorge Gustavo Rocha via Qgis-user  writes:

2) Using a geographic CRS, the same 150mm x 150mm map, at the same

1:1 scale, the area is bigger then the 1500m polygon. The result
is attached https://nextcloud.geomaster.pt/index.php/s/H2eAytsPANyxn6Y

On both layouts the scale bar widget is working properly. The
distances (and areas) are properly calculated in QGIS interface. I
have set the GRS 1980 ellipsoid for distance and area calculations.

What does it mean to use a geographic CRS for a print layout?  Do you
really expect longitude on the x axis and latitude on the y axis?  The
value of meters/degree is different for x and y, unless you are at or
near the equator.  (Living at 42N-ish, I'm very aware of this.)

This may be the case for projections like EPSG:3857 that are based on
a spherical projection of the Earth but is it the case for all
projections?

By "geographic CRS", I interpet that to mean one that is latitude and
longitude.  That is not really a "projection".

Yes, EPSG:3857 has an incorrect spherical assumption, and I'd have to
calculate, but I would not expect massive scale distortion, where
massive is casually visually apparent.

Perhaps Jorge can be precise about which CRS codes are in use.

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] Help with scales in print layouts for geographic CRS

2022-04-05 Thread Jorge Gustavo Rocha via Qgis-user

Hi,

I need you help to understand how scale works with geographic coordinate 
systems.


For projected coordinates systems, the layouts seems to work as expected.

This is my use case:

I've draw a polygon with 1000m width and height, and another with 1500, 
width and height, sharing the upper left corner.


1) Using a projected CRS, if I create a layout with a 150mm x 150mm map, 
the 1500m polygon fits perfectly on the print area, setting a 1:1 
scale. That's what I expected. The results is 
https://nextcloud.geomaster.pt/index.php/s/TKpkBaqty8BdLL8


2) Using a geographic CRS, the same 150mm x 150mm map, at the same 
1:1 scale, the area is bigger then the 1500m polygon. The result is 
attached https://nextcloud.geomaster.pt/index.php/s/H2eAytsPANyxn6Y


On both layouts the scale bar widget is working properly. The distances 
(and areas) are properly calculated in QGIS interface. I have set the 
GRS 1980 ellipsoid for distance and area calculations.


My question is: why the second layout does not fit the 1500m polygon 
properly? The second layout shows approximately a 2000m square, instead 
of a 1500m square.


Regards,

Jorge Gustavo


___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user