[QGIS-Developer] QGIS does not process PostgreSQL columns with geometry(Geometry, 4326)

2019-07-04 Thread wambacher
Hi,

in OpenStreetMap PostgreSQL/PostGIS database there is a table with a
geometry of type "geometry(Geometry,4326)".

see

 \d+ planet_osm_polygon
 ...
 way | geometry(Geometry,4326)
|  |   | | main   
|   |
 pointonsurface  | geometry(Point,4326)   
|  |   | | main   
|   |
 bbox    | geometry(Polygon,4326) 
|  |   | | main   
|   | 
 ...

The geometry column "way" is not visible in the layer dialog
(Layer/Layer hinzufügen/PostGIS Layer hinzufügen/):

see
https://wambachers-osm.website/images/osm/snaps_2019/tn_qgis_geometry_problem.png
and
https://wambachers-osm.website/images/osm/snaps_2019/tn_qgis_geometry_problem2.png

Creating views does help, but performance is very poor. That work around
should not be necessary, i think.

This table is really big: >300 GB without indices, 406.807.497 rows,
permanently growing.

Because that is an osm core table, i can't change the geometry of this
column (way) to "geometry( MultiPolygon, 4326)"  because i can't be
shure everything will be running fine after this change. Or will fail if
some core software has been changed.

QGIS 3.8.0 but older releases too. IIRC 2.x was ok.

any ideas?

Regards

walter

-- 

My projects:

Admin Boundaries of the World 
Missing Boundaries

Emergency Map 
Postal Code Map (Germany only) 
Fools (QA for zipcodes in Germany) 
Postcode Boundaries of Germany 
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Explode HStore algorithm

2019-05-12 Thread wambacher
Yes, i know this should be available in the toolbox but the toolbox was
very "small" yesterday. Only 6-7 entries and it did not contain such a
function.

BUT: Yesterday evening i had to do a reboot of my system after about 4
weeks (i'm doing this only if really, really needed) and what? Big
toolbox and the function is available. :)

@enrico: got it running using map functions too: had to change
/map_get(map_to_hstore(tags),'entrance') /into /map_get(tags,'entrance')/ :)

Thanks to both of you - great help.

Walter/
/

Am 12.05.19 um 18:24 schrieb DelazJ:
> Hi,
> See the Processing toolbox
> https://qgis.org/en/site/forusers/visualchangelog36/index.html#feature-explode-hstore-algorithm
>
> regards,
> Harrissou
>
> Le dim. 12 mai 2019 à 18:10,  > a écrit :
>
> Hi
>
> Am 12.05.19 um 17:03 schrieb Enrico Ferreguti:
>> You can handle hstore using dedicated maps functions in
>> expressions:
>> 
>> https://docs.qgis.org/testing/en/docs/user_manual/working_with_vector/expression.html#id25
>>
> I know, but the solution:
>
> *"In QGIS 3.4*, you can use the |htsore_to_map| expression to get
> a map (dictionary) of the hstore field. Then you can use one of
> the map    expressions to manipulate it"
> 
> (https://gis.stackexchange.com/questions/209421/how-to-categorize-features-based-on-hstore-values-in-qgis#288550)
>
> does not work using QGIS 3.6. I tried this without any success.
>
> There is a solution for 3.6 in the same text, but i can't find any
> way to do that.
>
> -- 
> My projects:
>
> Admin Boundaries of the World
> 
> Missing Boundaries
> 
> 
> Emergency Map 
> Postal Code Map (Germany only) 
> Fools (QA for zipcodes in Germany)
> 
> Postcode Boundaries of Germany
> 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org 
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-- 
My projects:

Admin Boundaries of the World 
Missing Boundaries

Emergency Map 
Postal Code Map (Germany only) 
Fools (QA for zipcodes in Germany) 
Postcode Boundaries of Germany 
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Explode HStore algorithm

2019-05-12 Thread wambacher
Hi

Am 12.05.19 um 17:03 schrieb Enrico Ferreguti:
> You can handle hstore using dedicated maps functions in expressions:
> https://docs.qgis.org/testing/en/docs/user_manual/working_with_vector/expression.html#id25
>
I know, but the solution:

*"In QGIS 3.4*, you can use the |htsore_to_map| expression to get a map
(dictionary) of the hstore field. Then you can use one of the map   
expressions to manipulate it"
(https://gis.stackexchange.com/questions/209421/how-to-categorize-features-based-on-hstore-values-in-qgis#288550)

does not work using QGIS 3.6. I tried this without any success.

There is a solution for 3.6 in the same text, but i can't find any way
to do that.

-- 
My projects:

Admin Boundaries of the World 
Missing Boundaries

Emergency Map 
Postal Code Map (Germany only) 
Fools (QA for zipcodes in Germany) 
Postcode Boundaries of Germany 
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Explode HStore algorithm

2019-05-11 Thread wambacher
Hi,

i'm running QGIS 3.6.2 and need to work with hstore.

Where can i find "Explode Hstore"?

regards
walter

My projects:

Admin Boundaries of the World 
Missing Boundaries

Emergency Map 
Postal Code Map (Germany only) 
Fools (QA for zipcodes in Germany) 
Postcode Boundaries of Germany 
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] QGIS 3, pygis 101 Styling QgsPointClusterRenderer

2019-03-12 Thread wambacher
Sorry, all done with pygis exept the OpenStreetMap layer

Am 12.03.19 um 16:44 schrieb wambac...@posteo.de:
>
> all done with pygis 101 :)
>
-- 
My projects:

Admin Boundaries of the World 
Missing Boundaries

Emergency Map 
Postal Code Map (Germany only) 
Fools (QA for zipcodes in Germany) 
Postcode Boundaries of Germany 
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] QGIS 3, pygis 101 Styling QgsPointClusterRenderer

2019-03-12 Thread wambacher
Yes, QgsMarkerSymbol is better - but this does not solve my problem.

This will replace the predefined marker symbol by a new one, but without
any details. e.g the count is missing.

What i need is to *modify* the existing cluster marker symbol (color and
size).

Fortunately the default marker symbol color is Red and the size is
acceptable, but later i would like to add other cluster point layers
using different colors.

current state:
https://wambachers-osm.website/images/osm/snaps_2019/Missing_Boundaries_20190311a.png

all done with pygis 101 :)

Am 07.03.19 um 17:05 schrieb Tom Chadwin:
> Is it that the symbol you set has to be a QgsMarkerSymbol, not just a
> QgsSymbol?
My projects:

Admin Boundaries of the World 
Missing Boundaries

Emergency Map 
Postal Code Map (Germany only) 
Fools (QA for zipcodes in Germany) 
Postcode Boundaries of Germany 
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] adding XYZ-Tiles in pygis 101 (Qgis3)

2019-03-12 Thread wambacher
Hi, any hints where to get doc or example?

regards

walter

-- 
My projects:

Admin Boundaries of the World 
Missing Boundaries

Emergency Map 
Postal Code Map (Germany only) 
Fools (QA for zipcodes in Germany) 
Postcode Boundaries of Germany 
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] QGIS 3, pygis 101 Styling QgsPointClusterRenderer

2019-03-07 Thread wambacher
Hi,

using QgsPointClusterRenderer() as renderer is working fine, but i can't
style it.

The old renderers are having arguments like "symbol"

symbol = QgsSymbol.defaultSymbol(pgLayer.geometryType())
symbol.setColor(QtGui.QColor.fromRgb(255,0,0))
symbol.setSize(4)

pgRenderer = pgLayer.setRenderer(QgsSingleSymbolRenderer(symbol))

and that is still running.

But the new renderers like PointCluster don't. There must be another way
(methods?) to configure that.

pgRenderer2 = pgLayer.setRenderer(QgsPointClusterRenderer()) 

pgRenderer2.setClusterSymbol(symbol)  # gives errors.

Searched for hours but can't solve that.

regards
walter


-- 
My projects:

Admin Boundaries of the World 
Missing Boundaries

Emergency Map 
Postal Code Map (Germany only) 
Fools (QA for zipcodes in Germany) 
Postcode Boundaries of Germany 
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] categorize using postgis hstore

2019-01-09 Thread wambacher
Hi,

i'm using QGIS 3.4 on ubuntu and want to categorize some data using hstore.

i was told (*) to use *map_get(hstore_to_map("tags"),'entrance')*, but
that does not work (for me). the result is ony one category for all nodes.

psql:

select osm_id,tags->'entrance' "tags->'entrance'"
  from planet_osm_point
 where tags ? 'entrance'
 limit 10;
   osm_id   | tags->'entrance'
+--
 3812284860 | main
 2312180146 | yes
 2773679231 | yes
  339015388 | main
  561073309 | service
  367081276 | main
  339015386 | yes
 1783531793 | main
 1783531816 | main
  367081281 | main
(10 Zeilen)

Zeit: 3,194 ms

any idea what's going wrong?

regards

walter

*)
https://gis.stackexchange.com/questions/209421/how-to-categorize-features-based-on-hstore-values-in-qgis/288550

image: https://wambachers-osm.website/images/osm/snaps_2018/categorize.png

btw: posted this question on qgis-user and FOSSGIS-talk during the last
2 weeks but did not get any answer :(

-- 
My projects:

Admin Boundaries of the World 
Missing Boundaries

Emergency Map 
Postal Code Map (Germany only) 
Fools (QA for zipcodes in Germany) 
Postcode Boundaries of Germany 
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Re: dealing with long primary keys / tests

2011-07-10 Thread wambacher
hi again,

something happened. after installing a newer 1.8, i can use my
openstreetmap-database now.

now i have big performance-problems but this sub-forum not the right place
to get help.

Thanks
walter

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/dealing-with-long-primary-keys-tp6440007p6567261.html
Sent from the qgis-developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Re: dealing with long primary keys

2011-06-06 Thread wambacher

Ivan Mincik-2 wrote:
 
 Maybe somebody can briefly explain, what kind of technical problem there
 is. There is discussion about it every half a year and still I am not
 sure what is going on.
hi, let's go:

\d nodes
 Tabelle »public.nodes«
Spalte| Typ | Attribute 
--+-+---
 id   | bigint  | not null
 version  | integer | not null
 user_id  | integer | not null
 tstamp   | timestamp without time zone | not null
 changeset_id | bigint  | not null
 tags | hstore  | 
 geom | geometry| 
Indexe:
pk_nodes PRIMARY KEY, btree (id)
idx_nodes_geom gist (geom) CLUSTER
Check-Constraints:
enforce_dims_geom CHECK (st_ndims(geom) = 2)
enforce_geotype_geom CHECK (geometrytype(geom) = 'POINT'::text OR geom
IS NULL)
enforce_srid_geom CHECK (st_srid(geom) = 4326)

gis=# select max(id) from nodes;
max 

 1314039345


bigint = int*8/64bit,  id is primary key getting bigger and bigger every
minute.

Add new layer:

http://wnordmann.homeunix.com/images/stories/osm/forum/screenshot-postgis-tabellen%20hinzufgen.png

and then 

http://wnordmann.homeunix.com/images/stories/osm/forum/screenshot-kann%20die%20schlsselspalte%20nicht%20finden.png

can be tested in about 60 seconds. just create a table with pk type bigint
and try.

creating oid's wont't help as those are even bigger. OSM ist a really BIG
database!

that's all.

Regards

walter

btw: max(id) is now 1314048177  (20 minutes later)









--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/dealing-with-long-primary-keys-tp6440007p6444870.html
Sent from the qgis-developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Re: dealing with long primary keys

2011-06-05 Thread wambacher

Paolo Cavallini wrote:
 
 Right, there is not enough interest to get it fixed. Feel free to sponsor
 the fix if
 this is important for you.
i can't do that. i'm not a developer. 
but i'm not the only guy who needs that feature. 
there are a lot of openstreetmap-databases in the world and all of them
can't be used by qgis.

Regards
walter


--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/dealing-with-long-primary-keys-tp6440007p6441815.html
Sent from the qgis-developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer