[Qgis-user] WMS: "single band, pseudocolor" render type missing?

2021-02-09 Thread Luca Manganelli
Hello,

I've converted a single band ASC file to a TIFF, in order to be served as
WMS.

I noted that on WMS raster I cannot apply the "single band, pseudocolor"
render type. Only "Singleband color data" is present.

Is there any way to achieve the missing option?
___
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] Issue with "Mesh Calculator" with a GRIB file

2021-02-09 Thread Vincent Cloarec
Hi,
Which QGIS version?

It seems 3.10.
Can you try with 3.16?

Regards.

Vincent

Le mar. 9 févr. 2021 à 22:55, Eric Compas  a écrit :

> All,
>
> I'm experimenting with the mesh viewing and analysis tools
> in QGIS (3.12.3) using both the Crayfish and QGribDownloader plugins. All's
> going very well, and for the most part, the tools are relatively easy to
> use.
>
> While I've gotten several "Mesh calculator" expressions to work correctly
> with a GRIB file (downloaded using the QGribDownloader plugin), I'm running
> into an error with any expression using precipitation group, e.g.:
>
> ("Temperature [C]" > 10) and ("03 hr Total precipitation [kg/(m^2)]" < 2)
>
>
> This expression yields an error "Mesh calculator: Invalid or incompatible
> datasets used." I've tried several permutations and start/end ranges. All
> without luck.
>
> Investigating further, it seems like the number of time "slices" in the
> precipitation group isn't the same as in the temperature group and may not
> be handled correctly in QGIS (??). In the temperature group layer
> properties, the time slider and metadata times are always the same
> (synchronized).  For the precipitation group, the time slider and metadata
> in the layer properties aren't in sync:
>
> [image: 2021-02-06_10-34-02b.gif]
> I suspect that the precipitation group has fewer time "slices" that may
> not be handled correctly and hence the error in the "Mesh Calculator" tool.
>
> Is this a user error or some issue with how the mesh tools handle groups
> with differing number of time "slices?"
>
> I'd appreciate any help.
>
> Thanks,
>
> Eric
>
> ___
> 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] Issue with "Mesh Calculator" with a GRIB file

2021-02-09 Thread Eric Compas
All,

I'm experimenting with the mesh viewing and analysis tools in QGIS (3.12.3)
using both the Crayfish and QGribDownloader plugins. All's going very well,
and for the most part, the tools are relatively easy to use.

While I've gotten several "Mesh calculator" expressions to work correctly
with a GRIB file (downloaded using the QGribDownloader plugin), I'm running
into an error with any expression using precipitation group, e.g.:

("Temperature [C]" > 10) and ("03 hr Total precipitation [kg/(m^2)]" < 2)


This expression yields an error "Mesh calculator: Invalid or incompatible
datasets used." I've tried several permutations and start/end ranges. All
without luck.

Investigating further, it seems like the number of time "slices" in the
precipitation group isn't the same as in the temperature group and may not
be handled correctly in QGIS (??). In the temperature group layer
properties, the time slider and metadata times are always the same
(synchronized).  For the precipitation group, the time slider and metadata
in the layer properties aren't in sync:

[image: 2021-02-06_10-34-02b.gif]
I suspect that the precipitation group has fewer time "slices" that may not
be handled correctly and hence the error in the "Mesh Calculator" tool.

Is this a user error or some issue with how the mesh tools handle groups
with differing number of time "slices?"

I'd appreciate any help.

Thanks,

Eric
___
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] question about CAD-like editing capabilities in QGIS

2021-02-09 Thread karsten
Hi All,
 
I have a bit more in-depth question about CAD-like editing capabilities in
QGIS. I have been consulting for a client that is basically a CAD shop and
where everyone is very comfortable using CAD tools Autocad or bricks cad and
so on. I reviewed the options they have to do the editing in QGIS and did
show the digitizing tool, advanced digitizing tools, snapping toolbar and
settings as well as the shape digitizing tool bar. I also showed the OAD
plug-in that is available. While the Advanced Digitizing Panel has lots of
options like shortcuts to enter angle (a) and distance (d) to CAD-like
construct polygons they also asked if the was a way to use center lines
(like in CAD) and then offsets to create a feature. While I found that the
Advanced Digitizing Panel can be combined with the settings of the shape
digitizing toolbar I did not really find what they where looking for Does
anyone know if that is possible in QGIS ?
 
Cheers
Karsten Vennemann
  www.terragis.net
 
___
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 - representing a graph in Qgis

2021-02-09 Thread Jorge Gustavo Rocha
Hi Giacomo,

Maybe it is better to share a sketch of what you want.

0) From the description of your use case, you can use the geographic
position of the nodes, right? You might be able to do what you want just
by creating points where you want to show the grid voltage and then
create direct lines between nodes. If you can display it on the map, you
don't need a graph.

1) Yes, you can use graphviz in the python console.

2) Graphviz does not read shapefiles. You have to iterate over your
layer and generate the corresponding graph nodes and edges.

Regards,

Jorge Gustavo

Às 23:06 de 09/02/21, Giacomo Uguccioni escreveu:
> Thank you guys for the support.
> Could I work with Graphviz in the python console inside Qgis? And does
> Graphviz support shapefiles or similar as an input? 
>
> Il giorno mar 9 feb 2021 alle 20:07 Jorge Gustavo Rocha
> mailto:j...@geomaster.pt>> ha scritto:
>
> Hi,
>
> I second Chris's proposal. Using graphviz python module [1], you
> can generate your graph by iterating over the features.
>
> At the end, just call the render and you will get the rendered
> graph (just add view=True) within your QGIS environment. You need
> to know some Python basic stuff, but not much than the basic.
>
> Regards,
>
> Jorge Gustavo
>
> [1] https://graphviz.readthedocs.io/en/stable/manual.html
>
> Às 18:55 de 09/02/21, chris hermansen escreveu:
>> Giacomo and list,
>>
>> On Tue, Feb 9, 2021 at 8:07 AM Giacomo Uguccioni
>> > > wrote:
>>
>> Hello everyone, and thanks for the support.
>> If this is not the place to ask for this kind of thing, I ask
>> you to give me a link where I could find support.
>> I'm a qgis 3.14 user. I would like to represent a tree
>> diagram or functional diagram being able to draw the
>> symbology and position of nodes and connections from the
>> information contained in the attribute table. Example: I
>> would like to represent the medium voltage grid of a city as
>> an electrical diagram; I would like to represent with lines
>> that join at nodes the roads that connect certain houses and
>> schools in a city. So my goal is to be able to build a layout
>> with symbology of nodes and connections derived from
>> information contained in different shapefiles or within
>> features, with a non-geographic but schematic / ideal criterion.
>> Do you have any ideas or suggestions on how to do it? I thank
>> you for every contribution.
>>
>>
>> Not a QGIS-based solution, but I've used graphviz
>>  to generate graphs from the command line
>> with considerable success.  It offers a small but useful
>> programming language that can be combined with data in text files
>> in a really useful way.
>>
>> -- 
>> Chris Hermansen · clhermansen "at" gmail "dot" com
>>
>> C'est ma façon de parler.
>>
>> ___
>> 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
> -- 
> Logo    
> *Geomaster*
> *Jorge Gustavo Rocha* | Software Engineer
> *e:*j...@geomaster.pt  | *m:*+351 910 333 888
> *g:*41.54094,-8.40490 | *v: *510 906 109
> *a: * Rua António Cândido Pinto, 67, 4715-400 Braga
> 
> 
>
> ___
> 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
>
> -- 
> *Giacomo Uguccioni*
> *Geospatial Data Acquisition & Processing*
> +39 3920431219
> Le informazioni contenute nella presente comunicazione sono riservate
> esclusivamente ai destinatari indicati in epigrafe. La diffusione del
> documento trasmesso da parte di qualsiasi soggetto diverso dal
> mittente e dal destinatario è proibita, sia ai sensi dell’art. 616
> c.p., sia ai sensi del D.Lgs. n. 196/2003 e regolamento UE n. 2016/679.
> Se avete ricevuto questo messaggio per errore, vi preghiamo di
> distruggerlo e di darcene immediata comunicazione anche inviando un
> messaggio di ritorno all’indirizzo e-mail del mittente. 
-- 
Email Signature
Logo  
*Geomaster*
*Jorge Gustavo Rocha* | Software Engineer
*e:*j...@geomaster.pt | *m:*+351 910 333 888
*g:*41.54094,-8.40490 | *v: *510 906 109
*a: * Rua António Cândido Pinto, 67, 4715-400 Braga

_

Re: [Qgis-user] GRASS and UK LIDAR

2021-02-09 Thread Nyall Dawson
On Wed, 10 Feb 2021 at 00:20, Dave Marshall <43carn...@gmail.com> wrote:
>
> Nyall,
>
> The first error which appears is "WARNING: Datum 
>  not recognised by GRASS and no 
> parameters found ".I think all subsequent errors stem from this. This error 
> message occurs whether I choose a CRS transformation or not.

Ok - that's an error coming straight from GRASS itself. You'll need to
ask the GRASS project about this one and raise a ticket on their issue
tracker!

Nyall

>
> Cheers,
>
> Dave
>
> On Tue, 9 Feb 2021 at 02:05, Nyall Dawson  wrote:
>>
>> On Tue, 9 Feb 2021 at 05:57, Dave Marshall <43carn...@gmail.com> wrote:
>> >
>> > Hello,
>> >
>> > I use QGIS 3.4 to visualise LIDAR tiles from the UK which use EPSG:27700 
>> > as the CRS. I put height contours on the images using the r.contour 
>> > feature in GRASS. This works extremely well. I have tried a couple of 
>> > times to move to a more up-to-date version of QGIS but in each case, the 
>> > version of r.contour associated with later versions does not work. These 
>> > later versions seem to require some sort of co-ordinate transformation on 
>> > opening the LIDAR files (I think to EPSG:4326) and I wonder if this is 
>> > part of the problem. Running r.contour generates an error message which 
>> > seems to suggest it does not recognise or cannot work with the CRS being 
>> > used (there is a reference to Airy Spheroid).
>>
>> What's the error?
>>
>> Nyall
>>
>>
>>
>> >
>> > What I would like to do is to be able to use a more up-to-date version of 
>> > QGIS but with the same version of GRASS which I get when I use 3.4. This 
>> > version would seem to be 7.6.1 rather than 7.8.5.
>> >
>> > There is a similar contour feature in QGIS under \Raster\Extraction but 
>> > this does not allow the specification of height ranges which is essential 
>> > for the work I am doing to avoid the routine from taking a very long time 
>> > to run.
>> >
>> > Any help or advice would be much appreciated,
>> >
>> > Dave Marshall
>> > ___
>> > 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 - representing a graph in Qgis

2021-02-09 Thread chris hermansen
Giacomo and list,

On Tue, Feb 9, 2021 at 3:06 PM Giacomo Uguccioni <
giacomo.ugucci...@gmail.com> wrote:

> Thank you guys for the support.
> Could I work with Graphviz in the python console inside Qgis? And does
> Graphviz support shapefiles or similar as an input?
>
> I'm not at all positive I'm understanding precisely what you want to do,
maybe Jorge or others are.

It sounds like you have shapefiles (or some kind of geodata) that has roads
and intersections.  This is already a graph.  You also say "with a
non-geographic but schematic / ideal criterion" which somehow made me think
of Graphviz, because it's designed to show non-geographic graphs and
automatically lay them out.

But now reading the above maybe all you want to do is symbolize your road /
intersection network according to some attributes.  If that's the case you
don't need Graphviz I think, just some work on symbology driven by
attribute values.

Maybe you could give us a bit more detail, or maybe do a sketch with pen on
paper and take a photo?


-- 
Chris Hermansen · clhermansen "at" gmail "dot" com

C'est ma façon de parler.
___
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] Bug report on Qgis

2021-02-09 Thread elio augusto sagastume leal
About the Qgis program, when i'm trying to save my geopackage, suddenly the
program trows a window of an error, and then the whole program closes .
___
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 - representing a graph in Qgis

2021-02-09 Thread Giacomo Uguccioni
Thank you guys for the support.
Could I work with Graphviz in the python console inside Qgis? And does
Graphviz support shapefiles or similar as an input?

Il giorno mar 9 feb 2021 alle 20:07 Jorge Gustavo Rocha 
ha scritto:

> Hi,
>
> I second Chris's proposal. Using graphviz python module [1], you can
> generate your graph by iterating over the features.
>
> At the end, just call the render and you will get the rendered graph (just
> add view=True) within your QGIS environment. You need to know some Python
> basic stuff, but not much than the basic.
>
> Regards,
>
> Jorge Gustavo
>
> [1] https://graphviz.readthedocs.io/en/stable/manual.html
> Às 18:55 de 09/02/21, chris hermansen escreveu:
>
> Giacomo and list,
>
> On Tue, Feb 9, 2021 at 8:07 AM Giacomo Uguccioni <
> giacomo.ugucci...@gmail.com> wrote:
>
>> Hello everyone, and thanks for the support.
>> If this is not the place to ask for this kind of thing, I ask you to give
>> me a link where I could find support.
>> I'm a qgis 3.14 user. I would like to represent a tree diagram or
>> functional diagram being able to draw the symbology and position of nodes
>> and connections from the information contained in the attribute table.
>> Example: I would like to represent the medium voltage grid of a city as an
>> electrical diagram; I would like to represent with lines that join at nodes
>> the roads that connect certain houses and schools in a city. So my goal is
>> to be able to build a layout with symbology of nodes and connections
>> derived from information contained in different shapefiles or within
>> features, with a non-geographic but schematic / ideal criterion.
>> Do you have any ideas or suggestions on how to do it? I thank you for
>> every contribution.
>>
>>
> Not a QGIS-based solution, but I've used graphviz 
> to generate graphs from the command line with considerable success.  It
> offers a small but useful programming language that can be combined with
> data in text files in a really useful way.
>
> --
> Chris Hermansen · clhermansen "at" gmail "dot" com
>
> C'est ma façon de parler.
>
> ___
> Qgis-user mailing listqgis-u...@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
> --
> [image: Logo] 
> *Geomaster*
> *Jorge Gustavo Rocha* | Software Engineer
> *e:* j...@geomaster.pt | *m:* +351 910 333 888
> *g:* 41.54094,-8.40490 | *v: * 510 906 109
> *a: * Rua António Cândido Pinto, 67, 4715-400 Braga
> 
> ___
> 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
>
-- 
*Giacomo Uguccioni*
*Geospatial Data Acquisition & Processing*
+39 3920431219
Le informazioni contenute nella presente comunicazione sono riservate
esclusivamente ai destinatari indicati in epigrafe. La diffusione del
documento trasmesso da parte di qualsiasi soggetto diverso dal mittente e
dal destinatario è proibita, sia ai sensi dell’art. 616 c.p., sia ai
sensi del D.Lgs. n. 196/2003 e regolamento UE n. 2016/679.
Se avete ricevuto questo messaggio per errore, vi preghiamo di distruggerlo
e di darcene immediata comunicazione anche inviando un messaggio di ritorno
all’indirizzo e-mail del mittente.
___
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-Developer] timzonefinder vs point in polygon

2021-02-09 Thread Nyall Dawson
On Wed, 10 Feb 2021 at 03:32, Matthias Kuhn  wrote:
>
> Hi Calvin,
>
> If you are looking for speed I would consider putting things into memory.
> I have seen that timezonefinder has an in_memory option which makes it even 
> faster.
> On QGIS side you can also load features into a memory layer and add a spatial 
> index to that.

Just to add to this -- if you pre-prepared the timezone polygon
geometries and cached all the results then that's the fastest speed
you'll ever achieve :) (at the cost of memory usage, however!)

Nyall

>
> Hope that helps to squeeze the last bit of performance out of this
> Matthias
>
> On Tue, Feb 9, 2021 at 5:52 PM C Hamilton  wrote:
>>
>> It is highly likely that you have a much faster machine than mine so I can 
>> only look at comparative times between timezonefinder and the PyQGIS code 
>> included below. You will notice that I take a snapshot of the time before 
>> and after I iterate through the 10,000 points using both timezonefinder as a 
>> look up and the code Nyall proposed. That is how I am getting the times. 
>> What I am really trying to determine is the fastest way to look up a point 
>> using either timezonefinder or PyQGIS code. Perhaps what I have with PyQGIS 
>> code is fast enough, but I am not satisfied if it is not close to the speed 
>> of timezonefinder.
>>
>> Ultimately, I am trying to determine whether I should continue to use 
>> timezonefinder as the method to look up time zones in my datetimetools 
>> plugin or should I have the gpkg time zone polygon layer as a part of the 
>> plugin and do lookups using it. Right now I am just doing single point 
>> lookups and it is probably fast enough, but I don't like that it is slower 
>> than timezonefinder. I am likely to expand datetimetools plugin to have a 
>> processing algorithm to do a lookup on a whole layer and in that case the 
>> PyQGIS method is better.
>>
>> Those are my thoughts and if there is a faster method using the gpkg time 
>> zone polygon to do the lookup, let me know.  One thing I just tried was 
>> using the shapefile from  
>> https://github.com/evansiroky/timezone-boundary-builder. It appears it is 
>> not spatially indexed and was taking too long. I resaved it as a shapefile 
>> and made sure it had a spatial index, but the gpkg conversion of the 
>> shapefile is even faster to access.
>>
>> Calvin
>>
>> On Tue, Feb 9, 2021 at 11:19 AM  wrote:
>>>
>>> Hi Calvin,
>>>
>>>
>>>
>>> Thanks for sending me this from the Developers list. I am not a part of the 
>>> Developer list, so I did not see the Join attribute by location tip from 
>>> Andrea.
>>>
>>>
>>>
>>> Anyway, what do you mean with not getting fast result with single point 
>>> lookups?
>>>
>>> When I select a single point from the 1 point layer and run the same 
>>> algorithm (check the selected features only option in the dialogue box), 
>>> the result takes 0.05 seconds (12 seconds for all 1). At least that is 
>>> what is says in the log tab of the algorithm. And it sure looks quick.
>>>
>>>
>>>
>>> Jeroen
>>>
>>>
>>>
>>>
>>>
>>> Van: C Hamilton 
>>> Verzonden: dinsdag 9 februari 2021 16:25
>>> Aan: Nyall Dawson 
>>> CC: Andrea Giudiceandrea ; qgis-developer 
>>> ; Groene Bij 
>>> Onderwerp: Re: [QGIS-Developer] timzonefinder vs point in polygon
>>>
>>>
>>>
>>> Nyall,
>>>
>>>
>>>
>>> Using "Join attributes by location" on a large set of points is fast, but 
>>> if you are doing single point lookups it bothers me that I am not getting 
>>> that fast of results in comparison to timezonefinder. The 10,000 points is 
>>> intended to test the speed of many single point lookups. If I were going to 
>>> actually do 10,000 point lookups I would use the Join attributes by 
>>> location, but here are my results of single point lookups using 
>>> timezonefinder vs. your method. Note that the assumption is that they can 
>>> be anywhere in the EPSG:4326 bounding box. I am not trying to constrain 
>>> them to the QGIS canvas.
>>>
>>>
>>>
>>> timezonefinder: 44 seconds
>>>
>>> Your method: 144 seconds
>>>
>>>
>>>
>>> Here is my code for each:
>>>
>>>
>>>
>>> timezonefinder
>>>
>>> from timezonefinder import TimezoneFinder
>>> import time
>>> tf = TimezoneFinder()
>>>
>>> l = iface.activeLayer()
>>> features = l.getFeatures()
>>>
>>> start_time = time.time()
>>> for f in features:
>>> pt = f.geometry().asPoint()
>>> name = tf.certain_timezone_at(lng=pt.x(), lat=pt.y())
>>> print('Time {}'.format(time.time() - start_time))
>>>
>>>
>>>
>>> Your method:
>>>
>>> import time
>>> tzlayer = QgsVectorLayer("W:\\My 
>>> Documents\\GitHub\\timezone_speed_lookup_test\\timezones.gpkg", 
>>> "timezones", "ogr")
>>>
>>> l = iface.activeLayer()
>>> features = l.getFeatures()
>>>
>>> start_time = time.time()
>>> for f in features:
>>> pt = f.geometry().asPoint()
>>> rect = QgsRectangle( pt.x()-0.01, pt.y()-0.1, 
>>> pt.x(),pt.y())
>>> request = QgsFeatureRequest().setFilterRect(rect)
>>> zones_intersectin

Re: [Qgis-user] Support - representing a graph in Qgis

2021-02-09 Thread Jorge Gustavo Rocha
Hi,

I second Chris's proposal. Using graphviz python module [1], you can
generate your graph by iterating over the features.

At the end, just call the render and you will get the rendered graph
(just add view=True) within your QGIS environment. You need to know some
Python basic stuff, but not much than the basic.

Regards,

Jorge Gustavo

[1] https://graphviz.readthedocs.io/en/stable/manual.html

Às 18:55 de 09/02/21, chris hermansen escreveu:
> Giacomo and list,
>
> On Tue, Feb 9, 2021 at 8:07 AM Giacomo Uguccioni
> mailto:giacomo.ugucci...@gmail.com>> wrote:
>
> Hello everyone, and thanks for the support.
> If this is not the place to ask for this kind of thing, I ask you
> to give me a link where I could find support.
> I'm a qgis 3.14 user. I would like to represent a tree diagram or
> functional diagram being able to draw the symbology and position
> of nodes and connections from the information contained in the
> attribute table. Example: I would like to represent the medium
> voltage grid of a city as an electrical diagram; I would like to
> represent with lines that join at nodes the roads that connect
> certain houses and schools in a city. So my goal is to be able to
> build a layout with symbology of nodes and connections derived
> from information contained in different shapefiles or within
> features, with a non-geographic but schematic / ideal criterion.
> Do you have any ideas or suggestions on how to do it? I thank you
> for every contribution.
>
>
> Not a QGIS-based solution, but I've used graphviz
>  to generate graphs from the command line with
> considerable success.  It offers a small but useful programming
> language that can be combined with data in text files in a really
> useful way.
>
> -- 
> Chris Hermansen · clhermansen "at" gmail "dot" com
>
> C'est ma façon de parler.
>
> ___
> 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
-- 
Email Signature
Logo  
*Geomaster*
*Jorge Gustavo Rocha* | Software Engineer
*e:*j...@geomaster.pt | *m:*+351 910 333 888
*g:*41.54094,-8.40490 | *v: *510 906 109
*a: * Rua António Cândido Pinto, 67, 4715-400 Braga

___
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 - representing a graph in Qgis

2021-02-09 Thread chris hermansen
Giacomo and list,

On Tue, Feb 9, 2021 at 8:07 AM Giacomo Uguccioni <
giacomo.ugucci...@gmail.com> wrote:

> Hello everyone, and thanks for the support.
> If this is not the place to ask for this kind of thing, I ask you to give
> me a link where I could find support.
> I'm a qgis 3.14 user. I would like to represent a tree diagram or
> functional diagram being able to draw the symbology and position of nodes
> and connections from the information contained in the attribute table.
> Example: I would like to represent the medium voltage grid of a city as an
> electrical diagram; I would like to represent with lines that join at nodes
> the roads that connect certain houses and schools in a city. So my goal is
> to be able to build a layout with symbology of nodes and connections
> derived from information contained in different shapefiles or within
> features, with a non-geographic but schematic / ideal criterion.
> Do you have any ideas or suggestions on how to do it? I thank you for
> every contribution.
>
>
Not a QGIS-based solution, but I've used graphviz 
to generate graphs from the command line with considerable success.  It
offers a small but useful programming language that can be combined with
data in text files in a really useful way.

-- 
Chris Hermansen · clhermansen "at" gmail "dot" com

C'est ma façon de parler.
___
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 - representing a graph in Qgis

2021-02-09 Thread Nicolas Cadieux
Hi,
See below
Nicolas

> Le 9 févr. 2021 à 11:07, Giacomo Uguccioni  a 
> écrit :
> 
> 
> Hello everyone, and thanks for the support.
> If this is not the place to ask for this kind of thing, I ask you to give me 
> a link where I could find support.
This is such a place.

> I'm a qgis 3.14 user. I would like to represent a tree diagram or functional 
> diagram

Not sure what you mean here but I imagine it’s like a car electrical diagram 
you find in garage manuals.  QGIS could do this but there is specialized CAD 
software for electrical or electronic engineering that will connect and 
position things for you. Since your talking about roads and voltage grid, you 
may want something that closer to a map than a diagram so QGIS will do it.

> being able to draw the symbology and position of nodes and connections from 
> the information contained in the attribute table. Example: I would like to 
> represent the medium voltage grid of a city as an electrical diagram; I would 
> like to represent with lines that join at nodes the roads that connect 
> certain houses and schools in a city.

You can do this with lines and point and up using the attributes tables. Then, 
you can use rule base rendering where for example, a line is black if you if 
you have something like « ground » it the attribute table.  You can create or 
import your own symbol for lines, points, and polygons.


> So my goal is to be able to build a layout with symbology of nodes and 
> connections derived from information contained in different shapefiles or 
> within features, with a non-geographic but schematic / ideal criterion.
> Do you have any ideas or suggestions on how to do it? I thank you for every 
> contribution.

> 
> My personal email is giacomo.ugucci...@gmail.com
> 
> Giacomo Uguccioni
> Geospatial Data Acquisition & Processing
> +39 3920431219
> Le informazioni contenute nella presente comunicazione sono riservate 
> esclusivamente ai destinatari indicati in epigrafe. La diffusione del 
> documento trasmesso da parte di qualsiasi soggetto diverso dal mittente e dal 
> destinatario è proibita, sia ai sensi dell’art. 616 c.p., sia ai sensi del 
> D.Lgs. n. 196/2003 e regolamento UE n. 2016/679. Se avete ricevuto questo 
> messaggio per errore, vi preghiamo di distruggerlo e di darcene immediata 
> comunicazione anche inviando un messaggio di ritorno all’indirizzo e-mail del 
> mittente. 
> ___
> 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] [QGIS-Developer] timzonefinder vs point in polygon

2021-02-09 Thread C Hamilton
It is highly likely that you have a much faster machine than mine so I can
only look at comparative times between timezonefinder and the PyQGIS code
included below. You will notice that I take a snapshot of the time before
and after I iterate through the 10,000 points using both timezonefinder as
a look up and the code Nyall proposed. That is how I am getting the times.
What I am really trying to determine is the fastest way to look up a point
using either timezonefinder or PyQGIS code. Perhaps what I have with PyQGIS
code is fast enough, but I am not satisfied if it is not close to the speed
of timezonefinder.

Ultimately, I am trying to determine whether I should continue to use
timezonefinder as the method to look up time zones in my
datetimetools plugin or should I have the gpkg time zone polygon layer as a
part of the plugin and do lookups using it. Right now I am just doing
single point lookups and it is probably fast enough, but I don't like that
it is slower than timezonefinder. I am likely to expand datetimetools
plugin to have a processing algorithm to do a lookup on a whole layer and
in that case the PyQGIS method is better.

Those are my thoughts and if there is a faster method using the gpkg time
zone polygon to do the lookup, let me know.  One thing I just tried was
using the shapefile from
https://github.com/evansiroky/timezone-boundary-builder. It appears it is
not spatially indexed and was taking too long. I resaved it as a shapefile
and made sure it had a spatial index, but the gpkg conversion of the
shapefile is even faster to access.

Calvin

On Tue, Feb 9, 2021 at 11:19 AM  wrote:

> Hi Calvin,
>
>
>
> Thanks for sending me this from the Developers list. I am not a part of
> the Developer list, so I did not see the Join attribute by location tip
> from Andrea.
>
>
>
> Anyway, what do you mean with not getting fast result with single point
> lookups?
>
> When I select a single point from the 1 point layer and run the same
> algorithm (check the selected features only option in the dialogue box),
> the result takes 0.05 seconds (12 seconds for all 1). At least that is
> what is says in the log tab of the algorithm. And it sure looks quick.
>
>
>
> Jeroen
>
>
>
>
>
> *Van:* C Hamilton 
> *Verzonden:* dinsdag 9 februari 2021 16:25
> *Aan:* Nyall Dawson 
> *CC:* Andrea Giudiceandrea ; qgis-developer <
> qgis-develo...@lists.osgeo.org>; Groene Bij 
> *Onderwerp:* Re: [QGIS-Developer] timzonefinder vs point in polygon
>
>
>
> Nyall,
>
>
>
> Using "Join attributes by location" on a large set of points is fast, but
> if you are doing single point lookups it bothers me that I am not getting
> that fast of results in comparison to timezonefinder. The 10,000 points is
> intended to test the speed of many single point lookups. If I were going to
> actually do 10,000 point lookups I would use the Join attributes by
> location, but here are my results of single point lookups using
> timezonefinder vs. your method. Note that the assumption is that they can
> be anywhere in the EPSG:4326 bounding box. I am not trying to constrain
> them to the QGIS canvas.
>
>
>
> timezonefinder: 44 seconds
>
> Your method: 144 seconds
>
>
>
> Here is my code for each:
>
>
>
> *timezonefinder*
>
> from timezonefinder import TimezoneFinder
> import time
> tf = TimezoneFinder()
>
> l = iface.activeLayer()
> features = l.getFeatures()
>
> start_time = time.time()
> for f in features:
> pt = f.geometry().asPoint()
> name = tf.certain_timezone_at(lng=pt.x(), lat=pt.y())
> print('Time {}'.format(time.time() - start_time))
>
>
>
> *Your method*:
>
> import time
> tzlayer = QgsVectorLayer("W:\\My
> Documents\\GitHub\\timezone_speed_lookup_test\\timezones.gpkg",
> "timezones", "ogr")
>
> l = iface.activeLayer()
> features = l.getFeatures()
>
> start_time = time.time()
> for f in features:
> pt = f.geometry().asPoint()
> rect = QgsRectangle( pt.x()-0.01, pt.y()-0.1,
> pt.x(),pt.y())
> request = QgsFeatureRequest().setFilterRect(rect)
> zones_intersecting_bounding_box = tzlayer.getFeatures(request)
> for tz_feature in zones_intersecting_bounding_box:
> if tz_feature.geometry().intersects(rect):
> name = tz_feature[1]
> break
>
> print('Time {}'.format(time.time() - start_time))
>
>
>
>
>
> I'd suggest using similar logic to what join attributes by location
> does internally. In pseudocode:
>
> search_point = ...
> search_bbox = QgsRectangle( search_point.x() - some tolerance,
> search_point.y() - some_tolerance, ... )
> request = QgsFeatureRequest().setFilterRect(search_bbox)
> zones_intersecting_bounding_box = tz_layer.getFeatures(request)
> for time_zone_feature in zones_intersecting_bounding_box:
> if time_zone_feature.intersects(search_point):
> # found a hit!
> break
>
> This will take advantage of whatever spatial index you have on the
> time zone layer (e.g. the internal shapefile/gpkg/... index)
>
> There's quite a numb

Re: [Qgis-user] [QGIS-Developer] timzonefinder vs point in polygon

2021-02-09 Thread mail
Hi Calvin,

 

Thanks for sending me this from the Developers list. I am not a part of the 
Developer list, so I did not see the Join attribute by location tip from Andrea.

 

Anyway, what do you mean with not getting fast result with single point lookups?

When I select a single point from the 1 point layer and run the same 
algorithm (check the selected features only option in the dialogue box), the 
result takes 0.05 seconds (12 seconds for all 1). At least that is what is 
says in the log tab of the algorithm. And it sure looks quick.

 

Jeroen

 

 

Van: C Hamilton  
Verzonden: dinsdag 9 februari 2021 16:25
Aan: Nyall Dawson 
CC: Andrea Giudiceandrea ; qgis-developer 
; Groene Bij 
Onderwerp: Re: [QGIS-Developer] timzonefinder vs point in polygon

 

Nyall,

 

Using "Join attributes by location" on a large set of points is fast, but if 
you are doing single point lookups it bothers me that I am not getting that 
fast of results in comparison to timezonefinder. The 10,000 points is intended 
to test the speed of many single point lookups. If I were going to actually do 
10,000 point lookups I would use the Join attributes by location, but here are 
my results of single point lookups using timezonefinder vs. your method. Note 
that the assumption is that they can be anywhere in the EPSG:4326 bounding box. 
I am not trying to constrain them to the QGIS canvas.

 

timezonefinder: 44 seconds

Your method: 144 seconds

 

Here is my code for each:

 

timezonefinder

from timezonefinder import TimezoneFinder
import time
tf = TimezoneFinder()

l = iface.activeLayer()
features = l.getFeatures()

start_time = time.time()
for f in features:
pt = f.geometry().asPoint()
name = tf.certain_timezone_at(lng=pt.x(), lat=pt.y())
print('Time {}'.format(time.time() - start_time))

 

Your method:

import time
tzlayer = QgsVectorLayer("W:\\My 
Documents\\GitHub\\timezone_speed_lookup_test\\timezones.gpkg", "timezones", 
"ogr")

l = iface.activeLayer()
features = l.getFeatures()

start_time = time.time()
for f in features:
pt = f.geometry().asPoint()
rect = QgsRectangle( pt.x()-0.01, pt.y()-0.1, pt.x(),pt.y())
request = QgsFeatureRequest().setFilterRect(rect)
zones_intersecting_bounding_box = tzlayer.getFeatures(request)
for tz_feature in zones_intersecting_bounding_box:
if tz_feature.geometry().intersects(rect):
name = tz_feature[1]
break

print('Time {}'.format(time.time() - start_time))

 

 

I'd suggest using similar logic to what join attributes by location
does internally. In pseudocode:

search_point = ...
search_bbox = QgsRectangle( search_point.x() - some tolerance,
search_point.y() - some_tolerance, ... )
request = QgsFeatureRequest().setFilterRect(search_bbox)
zones_intersecting_bounding_box = tz_layer.getFeatures(request)
for time_zone_feature in zones_intersecting_bounding_box:
if time_zone_feature.intersects(search_point):
# found a hit!
break

This will take advantage of whatever spatial index you have on the
time zone layer (e.g. the internal shapefile/gpkg/... index)

There's quite a number of extra optimisations which could be done here
if the speed isn't sufficient for mouse movements, e.g. you could
fetch all the zone features in the canvas extent and "prepare" their
geometries for ultra fast point in polygon tests, and then invalidate
this cache and rebuild on each canvas extent change. But I'd only do
that kind of thing if needed...

Nyall





>
> Calvin
>
> On Fri, Feb 5, 2021 at 6:30 PM Nyall Dawson   > wrote:
>>
>> On Sat, 6 Feb 2021 at 07:54, Andrea Giudiceandrea >  > wrote:
>> >
>> > C Hamilton wrote
>> > > Using the algorithm Vector->Geoprocessing Tools->Intersection: 4 minutes,
>> > > 4
>> > > seconds
>> >
>> > Hi Calvin,
>> > maybe it could be better to use the "Join attributes by location" 
>> > algorithm.
>> > It only takes few seconds to preform the join.
>>
>> Confirmed - for me it only takes ~2 seconds, and that's on an
>> non-optimised debug build! There may be a few % more performance boost
>> on the proper QGIS release builds.
>>
>> "Join attributes by location" has a bunch of extra logic to optimise
>> the method that the join is performed, which really pays off in this
>> particular situation (matching points to polygons, where number of
>> points >> number of polygons).
>>
>> Nyall
>>
>>
>>
>> >
>> > Regards.
>> >
>> > Andrea
>> >
>> >
>> >
>> > --
>> > Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html
>> > ___
>> > QGIS-Developer mailing list
>> > qgis-develo...@lists.osgeo.org  
>> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> ___
>> QGIS-Developer mailing list
>>

[Qgis-user] Support - representing a graph in Qgis

2021-02-09 Thread Giacomo Uguccioni
Hello everyone, and thanks for the support.
If this is not the place to ask for this kind of thing, I ask you to give
me a link where I could find support.
I'm a qgis 3.14 user. I would like to represent a tree diagram or
functional diagram being able to draw the symbology and position of nodes
and connections from the information contained in the attribute table.
Example: I would like to represent the medium voltage grid of a city as an
electrical diagram; I would like to represent with lines that join at nodes
the roads that connect certain houses and schools in a city. So my goal is
to be able to build a layout with symbology of nodes and connections
derived from information contained in different shapefiles or within
features, with a non-geographic but schematic / ideal criterion.
Do you have any ideas or suggestions on how to do it? I thank you for every
contribution.

My personal email is giacomo.ugucci...@gmail.com

*Giacomo Uguccioni*
*Geospatial Data Acquisition & Processing*
+39 3920431219
Le informazioni contenute nella presente comunicazione sono riservate
esclusivamente ai destinatari indicati in epigrafe. La diffusione del
documento trasmesso da parte di qualsiasi soggetto diverso dal mittente e
dal destinatario è proibita, sia ai sensi dell’art. 616 c.p., sia ai
sensi del D.Lgs. n. 196/2003 e regolamento UE n. 2016/679. Se avete
ricevuto questo messaggio per errore, vi preghiamo di distruggerlo e di
darcene immediata comunicazione anche inviando un messaggio di ritorno
all’indirizzo e-mail del mittente.
___
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] Install Postgresql and Postgis

2021-02-09 Thread Richard Duivenvoorde
On 2/9/21 1:52 PM, Nick Hopton wrote:
> It's from the Training Manual Richard:
> 
> https://docs.qgis.org/2.14/en/docs/training_manual/spatial_databases/spatial_functions.html
> 
> Apologies if there is something more recent, if there is I couldn't find it.

Ah, 2.14 yes, that is old... but ... it is even in our latest version:
https://docs.qgis.org/testing/en/docs/training_manual/spatial_databases/spatial_functions.html

To be removed :-)

Anyway to install postgresql AND postgis the easy way, just do:

apt install postgis

and that will also install postgresql (as it is a dependency of postgis off 
course).

And which version: who cares (not relevant for training excercises I think): 
the one that is current to your distro :-)

Regards,

Richard Duivenvoorde

___
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] GRASS and UK LIDAR

2021-02-09 Thread Dave Marshall
Nyall,

The first error which appears is "WARNING: Datum
 not recognised by GRASS and no
parameters found ".I think all subsequent errors stem from this. This error
message occurs whether I choose a CRS transformation or not.

Cheers,

Dave

On Tue, 9 Feb 2021 at 02:05, Nyall Dawson  wrote:

> On Tue, 9 Feb 2021 at 05:57, Dave Marshall <43carn...@gmail.com> wrote:
> >
> > Hello,
> >
> > I use QGIS 3.4 to visualise LIDAR tiles from the UK which use EPSG:27700
> as the CRS. I put height contours on the images using the r.contour feature
> in GRASS. This works extremely well. I have tried a couple of times to move
> to a more up-to-date version of QGIS but in each case, the version of
> r.contour associated with later versions does not work. These later
> versions seem to require some sort of co-ordinate transformation on opening
> the LIDAR files (I think to EPSG:4326) and I wonder if this is part of the
> problem. Running r.contour generates an error message which seems to
> suggest it does not recognise or cannot work with the CRS being used (there
> is a reference to Airy Spheroid).
>
> What's the error?
>
> Nyall
>
>
>
> >
> > What I would like to do is to be able to use a more up-to-date version
> of QGIS but with the same version of GRASS which I get when I use 3.4. This
> version would seem to be 7.6.1 rather than 7.8.5.
> >
> > There is a similar contour feature in QGIS under \Raster\Extraction but
> this does not allow the specification of height ranges which is essential
> for the work I am doing to avoid the routine from taking a very long time
> to run.
> >
> > Any help or advice would be much appreciated,
> >
> > Dave Marshall
> > ___
> > 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] Install Postgresql and Postgis

2021-02-09 Thread Nick Hopton
It's from the Training Manual Richard:

https://docs.qgis.org/2.14/en/docs/training_manual/spatial_databases/spatial_functions.html

Apologies if there is something more recent, if there is I couldn't find it.

Regards,
Nick. 



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
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] FW: timzonefinder vs point in polygon

2021-02-09 Thread mail
Below mail was sent to the developers list instead of the user list.

 

Jeroen

 

Van: m...@groenebij.nl  
Verzonden: dinsdag 9 februari 2021 12:11
Aan: 'C Hamilton' ; 'qgis-developer' 

CC: 'Richard Duivenvoorde' ; 'Tim Sutton' 
; 'Nyall Dawson' 
Onderwerp: RE: timzonefinder vs point in polygon

 

Hi Calvin,

 

I have run a few tests, and might have found the algorithm you need.

First sharing some result here. It might help in understanding what is going on.

 

On my system (qgis 3.16, windows10, i510600 cpu at 3.3 GHz, 32 GB mem and a 
nvme SSD), the Vector->Geoprocessing Tools->Intersection took about 3 minutes 
and 10 seconds.

It also duplicated 32 of the 1 points, they got 2 different time zones. 
That might suggest there is something going on with the precision of both the 
vector layer and the point layer.

Removing those 32 points and running the algorithm again did not change the run 
time. So no luck there.

 

Using postgis and sql queries within DB Manager, things were really quick.

Postgresql 11.10 and postgis 2.5.3

 

SELECT p.id, p.fid, t.tzid

FROM points_10_32 AS p

JOIN timezones AS t

ON st_within (p.geom, t.geom)

 

This took just 12 seconds.

Using st_intersects in stead of st_within made no difference, also done in 12 
seconds.

 

I must note, when importing the layers into my database, I always check the 
‘create spatial index’

So, I also imported the layers into the database without creating the spatial 
index.

This time the query took 40 seconds. Still, much faster than the Intersection 
algorithm in Geoprocessing Tools.

 

A quick Google search (qgis geoprocessing tool intersect vs st_intersects) got 
me this page:

 

 
https://gis.stackexchange.com/questions/307511/faster-alternative-to-intersection-in-qgis-to-just-retain-overlapping-features

 

 

And that got me searching for alternatives and I actually found one:

 

Vector->Datamanagement Tools->join attributes by location

Settings:

input layer = point layer

Join = timezones layer

Geometric predicate = intersects

Join type = one-to-many

 

This seems to do the same thing as Geoprocessing Tools->Intersection, however, 
this one just took 2.9 seconds!

There is definitely something different in how these algorithms work and I have 
no idea what that might be. But the Join Attributes by Location tool might just 
be what you are looking for.

 

 

Also, 3 seconds is even 4 times faster than the sql query, but that is a 
different issue.

It might actually have something to do with qgis3.12 and above. Running the sql 
in DB Manager in qgis 3.10 takes 6 seconds compared to 12 seconds (qgis3.16), 
see this bug report   
https://github.com/qgis/QGIS/issues/38256

 

 

Kind regards,

Jeroen

 

 

Van: C Hamilton mailto:adenacult...@gmail.com> > 
Verzonden: vrijdag 5 februari 2021 22:23
Aan: qgis-developer mailto:qgis-develo...@lists.osgeo.org> >; Richard Duivenvoorde 
mailto:rdmaili...@duif.net> >; Tim Sutton 
mailto:t...@kartoza.com> >; Nyall Dawson 
mailto:nyall.daw...@gmail.com> >; Groene Bij 
mailto:m...@groenebij.nl> >
Onderwerp: timzonefinder vs point in polygon

 

I need the ability to do a fast time zone lookup in QGIS and found the popular 
timezonefinder library which I encorported into the Date/Time Tools plugin. See

 

 

 
https://github.com/NationalSecurityAgency/qgis-datetimetools-plugin/releases/tag/3.0.1

 

Rather than using this, Nyall suggested that I just use the original polygon 
data set and do a point in polygon lookup. So I have done some testing on a 
10,000 random point data set where I was looking up the timezone of each point.

 

Time results for 10,000 points

Using timezonefinder: 44 seconds

 

Using the algorithm Vector->Geoprocessing Tools->Intersection: 4 minutes, 4 
seconds

 

I also tried iterating over each of the 10,000 points then testing each of the 
time zone polygons to see if the point feature was contained in it using this 
statement. It returned once it found a match.

 

polyfeature.geometry().contains(point_feature) 

 

This was definitely not the way to do it and I killed qgis before it finished.

 

My conclusion is that timezonefinder has been optimized for very fast lookups. 
I'm sure there is probably a better way for me to work with a point in polygon 
lookup and if anyone has any further suggestions let me know. I can see games I 
could play such as first testing the bounding box or setting up lookup tables, 
but that is what timezonefinder does so for now that is what I will use.

 

If I have missed some fast point in polygon lookup up in the QGIS API please 
let me know.

 

Thanks,

 

Calvin

 

___
Qgis-user mailing list
Qgis-user@lists.osgeo.or

Re: [Qgis-user] Geometries of labels - automatic positioning (no covering)

2021-02-09 Thread Richard Duivenvoorde
On 2/9/21 1:29 PM, Matej Mailing wrote:
> Hello Regis,
> 
> I cannot find that option you mention: "the placement option "always
> displays" on the layers"
> 
> I seem to have checked all the options - I am using QGIS 3.16.3.

See screenshot, it is in the last tab, checkbox "Show all labels for this layer 
(including colliding labels)"

Regards,

Richard Duivenvorde
___
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] Geometries of labels - automatic positioning (no covering)

2021-02-09 Thread Matej Mailing
Hello Regis,

I cannot find that option you mention: "the placement option "always
displays" on the layers"

I seem to have checked all the options - I am using QGIS 3.16.3.

Thanks,
Matej

V V pet., 5. feb. 2021 ob 15:20 je oseba Régis Haubourg
 napisala:
>
> Back on the mailing list.
>
> mm, so you want to force labels on all features right, especially on
> crowded locations?
>
> Did you try the placement option "always displays" on the layers you
> want to force?
>
> I you get a screenshot, that would help
>
> Best
>
> Régis
>
> On 05/02/2021 13:53, Matej Mailing wrote:
> > Hi,
> >
> > I would like that the collision engine positions all the labels of
> > selected layers at every scale. I am aware that I can play with the
> > labeling priorities, but when there are two geometries, for example
> > short line and a long line in case of roads or some crossings, there
> > are locations on the map where a large number of labels should be
> > visible and I cannot get a result that all of the labels are visible
> > generally no matter what fixed positions are and their priorities.
> >
> > I need to plot out the map at the fixed scale and have all the labels
> > of the selected layers visible at that scale in this scenario. I don't
> > mind their exact location, just that they have to be visible and not
> > covered by each other. The labels are from a number of layers and
> > represent different types of information (i.e. road names, blocks,
> > crossing names etc.) and I need them to be positioned in a way they
> > are all always visible, which is currently impossible as a small
> > crossing is such a small geometry that is covered with labels from
> > other objects although trying all the priority combinations.
> >
> > Maybe the scale parameter isn't important in this equation as I am
> > thinking now as if enabled, this feature would simply work at all the
> > scales :)
> >
> > Hopefully I was able to define this clear enough. If not, please let me 
> > know ;)
> >
> > Thanks,
> > Matej
> >
> > V V pet., 5. feb. 2021 ob 13:20 je oseba Régis Haubourg
> >  napisala:
> >> Hi,
> >>
> >> I'm not sure I get correctly what you mean here. You would like the
> >> collision engine to take into account a subset of selected layers? How
> >> would you select them ? Are you aware that you can already play with
> >> labeling priorities on a layer level, and also use some layers to block
> >> labeling on its features.
> >>
> >> Let us know a bit more precisely how you see it.
> >>
> >> Best regards
> >>
> >> Régis
> >>
> >>
> >> On 05/02/2021 13:14, Matej Mailing wrote:
> >>> Hello Regis,
> >>>
> >>> thank you for the clarification. What would help very much would be an
> >>> optional input to the collision engine to execute itself for the
> >>> labels of the selected layers at the selected scale. The result would
> >>> then, if I understand correctly, mean that no labels of the selected
> >>> layers cover each other at that scale. Would that make sense?
> >>>
> >>> Thanks,
> >>> Matej
> >>>
> >>>
> >>> V V pet., 29. jan. 2021 ob 18:20 je oseba Régis Haubourg
> >>>  napisala:
>  Hi Matej,
> 
>  There is no geometry stored for labels, it is all up to the collision
>  engine to compute on the fly for each context where to draw labels.
> 
>  You can "pin" labels, and a XY location is stored then, either in the
>  dataset if you set dedicated fields in the advanced labeling options,
>  and your layer is editable, Or in the auxiliary database (a sqlite .qgd
>  side car file) linked to your layer.
> 
>  You can access the auxiliary data in the layer properties.
> 
>  Last option I know of, you can use geometry generators to provide
>  "paths" for labels. Ex: smoothen a sharp line with some smooth /
>  generalize expressions so that the curved labels are better looking.
> 
> 
>  Best regards
> 
>  Régis
> 
>  On 19/01/2021 15:41, Matej Mailing wrote:
> > Hello,
> >
> > where are the geometries of the labels stored in the 3.16.x branch?
> >
> > We would like to get them to PostGIS to autmatically manipulate the
> > positions in a way that the labels do not cover each other in a
> > smaller scale, i.e. 1:1000. Or is there any plugin that would do this?
> >
> > Thanks,
> > Matej
> > ___
> > 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 mailing list
Qgis-user@lists.osgeo.org
List info: https://list

Re: [Qgis-user] Install Postgresql and Postgis

2021-02-09 Thread Richard Duivenvoorde
On 2/9/21 12:35 PM, Nick Hopton wrote:
> I'm having problems installing Postgres and Postgis, the most recent version
> of the manual I can find says:
> 
> $ sudo apt install postgis
> $ sudo apt install postgresql-9.1-postgis

Hi Nick,

Is that the QGIS manual? As I think we should not use version numbers in our 
manuals for this kind of things.

So, if so, please point me to the place where you have this from in our docs.

Regards,

Richard Duivenvoorde
___
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] Install Postgresql and Postgis

2021-02-09 Thread Jorge Gustavo Rocha
Hi Nick,

I do the following in Ubuntu 20.04:

sudo apt-get install curl ca-certificates gnupg
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt
$(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
sudo apt update
sudo apt install postgresql postgresql-13-postgis-3
postgresql-13-postgis-3-scripts
sudo apt install --no-install-recommends postgis
sudo pg_ctlcluster 13 main start

Regards,

Jorge

Às 11:35 de 09/02/21, Nick Hopton escreveu:
> Ubuntu 20.04, QGIS 3.16.3.
>
> I'm having problems installing Postgres and Postgis, the most recent version
> of the manual I can find says:
>
> $ sudo apt install postgis
> $ sudo apt install postgresql-9.1-postgis
>
> This doesn't work any more, Postgis installs but Postgres doesn't, I think
> the relevant file is missing from the repository.
>
> I'm stuck here, can anyone help?
>
> Regards,
> Nick.
>
>
>
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
> ___
> 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
-- 
Email Signature
Logo  
*Geomaster*
*Jorge Gustavo Rocha* | Software Engineer
*e:*j...@geomaster.pt | *m:*+351 910 333 888
*g:*41.54094,-8.40490 | *v: *510 906 109
*a: * Rua António Cândido Pinto, 67, 4715-400 Braga

___
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] Install Postgresql and Postgis

2021-02-09 Thread Nick Hopton
Ubuntu 20.04, QGIS 3.16.3.

I'm having problems installing Postgres and Postgis, the most recent version
of the manual I can find says:

$ sudo apt install postgis
$ sudo apt install postgresql-9.1-postgis

This doesn't work any more, Postgis installs but Postgres doesn't, I think
the relevant file is missing from the repository.

I'm stuck here, can anyone help?

Regards,
Nick.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
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