Re: [QGIS-Developer] [Qgis-user] QGIS.org new website now online

2024-07-17 Thread Tomas Straupis via QGIS-Developer
2024-07-17, tr, 01:00 Tim Sutton rašė:
> <...> the site is a complete overhaul and will likely require a fresh start 
> translation
> wise, if we continue with that approach.

  Visual changelog, case study pages are exactly the same, a lot of
other (larger) pages are (text-wise) almost the same.
  Translating just ONE changelog page took ~week of work. All of that
was thrown away. It is hard to guess the (unstated/un-communicated)
benefit/justification of losing all of that hard work of unpaid
volunteers. It will take a lot of time till I will want to translate
again :-(

-- 
Tomas
___
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-user] QGIS.org new website now online

2024-07-12 Thread Tomas Straupis via QGIS-Developer
Hello

  So sadly our translations go to the trash can.
  Should we continue translating documentation, or that is also going
to be thrown out?

-- 
Tomas
___
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] Paste geometry functionality

2023-11-29 Thread Tomas Straupis via QGIS-Developer
Hello

  Regarding different plugin proposals. I have checked nexta plugin
and even submitted a fix to it which solved the problem only
partially. From what I see it cannot be solved nicely via python
because of different environment/setup reasons. I know this can be
done in some way using different other plugins. This can also be done
by one line of code in postgresql.

  The point is that people migrating from "other" products are used to
such basic feature and that feature is wanted/required for quite a
number of different tasks.

  I got the main information: there are no objective reasons for such
functionality not to be in core. I will therefore try implementing it.

  Thank you for your responses!

-- 
Tomas
___
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] Paste geometry functionality

2023-11-29 Thread Tomas Straupis via QGIS-Developer
2023-11-29, tr, 15:53 Régis Haubourg via QGIS-Developer rašė:
> Can you be more precise on your use case scenario ?

  Let's say we have a layer L (PostgreSQL/PostGIS) with features A, B
and C with corresponding attribute values set.
  Now some external party sends us a shapefile S with an updated
geometry G which we want to apply to feature B.

  We want to:
  1. Select G in layer S and press Ctrl+C
  2. Select feature B in layer L (layer is in edit mode).
  3. Do "Paste geometry" which should change geometry of feature B but
leave all attribute values intact. This must be an update (not
delete/insert) operation for record B in database table, as database
would usually have different sequences, triggers with business logic
etc.

-- 
Tomas
___
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] Paste geometry functionality

2023-11-28 Thread Tomas Straupis via QGIS-Developer
Hello

  I was wondering, is there any reason why "paste geometry" (for
vector features) is not implemented in QGIS? Or is it simply because
nobody implemented it (I'm thinking of trying to do that)?

  The use case is different government cadastres where geometry is
provided by external institutions and institution responsible for
maintaining the cadastre is adding the attribute values. While they
can use full feature paste (with attributes) for initial record
creation, updating requires the possibility to paste geometry only
without changing any attribute values.

  Thank you

P.S. I am aware of a python plugin for that but it does not work for
large geometries as clipboard size limit is reached pretty fast on
windows.

-- 
Tomas
___
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] WMS GetCapabilities NAME tag for groups

2023-05-02 Thread Tomas Straupis via QGIS-Developer
Hello

  QGIS Server is providing a GetCapabilities document for a service.
This document besides different stuff describes all layers provided.
Layer description includes NAME and TITLE tags. These layers can then
later be specified in GetMap LAYERS parameter by the value provided in
layers NAME tag (not TITLE, as that could have spaces, national
characters etc.).

 Now if we have a group of layers in QGIS project, say:
  G1
  * L1
  * L2

  GetCapabilities would list all three, which is fine. But all of them
would have a NAME tag meaning that then we could request G1 in a
LAYERS parameter together with L1 and L2 (like LAYERS=G1,L1,L2) which
would produce doubles of layer L1 and L2 (f.e. double labels, but I
assume this would also mean double symbology).

  OGC WMS standard states* that if we do not want some layer - for
example a group - to be specified in a LAYERS parameter, we should not
be providing NAME tag for that layer (only TITLE, so that group can be
displayed in a tree).

  QGIS has a specific possibility to specify detailed parameters for a
group (different name, title, description).

  QUESTION: what should be the right direction for QGIS here?
  a) project level setting of name tag for groups: provide / not
provide name tag
  b) group level setting (extending existing group details dialog) to
control name tag behaviour

  What should be the default behaviour:
  a) provide NAME tag for groups (this would be consistent the with
current behaviour, but to me this is not what most users would want?)
  b) not provide NAME tag for groups

  Thank you

* OGC WMS: Part 7.2.4.6.3 in this document:
https://portal.ogc.org/files/?artifact_id=14416

-- 
Tomas
___
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 "fast" mode

2020-03-18 Thread Tomas Straupis
2020-03-18, tr, 21:41 kimaidou rašė:
> # only few requests are avoided as you pointed out so the performance 
> improves "only" a bit

  In large databases those few requests take minutes and sometimes
even hours... For servers even 30 seconds are too much when you're
trying to add a new QGIS server process to existing say 10 while on
high load doing 500 requests per second.

> # sometimes you have some layers with changing data, and there is actually no 
> way to trust only a subset of layers inside the project

  1. If geometry types are changing by design, then checking geometry
type upon project loading is not enough. Then you need to ALWAYS
filter your results by requested geometry type. But only if it is the
case of varying geometry types. In my opinion, developer of the
layer/query should know beforehand if it is possible for geometry
types to variate and then create a view filtering on geometry type (or
it could be an option in QGIS ~"filter on geometry type").

  2. If database schemas are changing on-line then I would say
something is very wrong with the IT processes. Changes should start on
dev environment where data changes and QGIS project changes as well.
Then changes to db structure go to other environments up to production
in patches TOGETHER with updated QGIS project. System (in this case
QGIS) should never (in my experience) try to "fix" the problem because
it does not know all required information: maybe the project was
opened in incorrect environment, maybe it is a temporary problem,
maybe the real table is missing and you're accidentally trying to
query incorrect table which was never supposed to be queried -> strict
rules/control. Of course there could be a button "refresh" on a layer
to allow operator to re-query layer information upon manual request.

> Do you think it would be interesting to have the trust option per layer and 
> not only per project?

  Theoretically there could be very different data sources, but in my
opinion if organisation uses strict IT processes then all layers will
be strictly managed (you would rarely/never have direct access to the
database of a different company/institution with different/weaker
processes). And vice versa.

-- 
Tomas
___
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 "fast" mode

2020-03-16 Thread Tomas Straupis
2020-03-16, pr, 10:48 Julien Cabieces rašė:
> This function is only for PostGres (Tomas use an Oracle database if I
> remember correctly).

  Actually I use PostgreSQL more, but this particular performance
problem is with Oracle database.
  And if enough people agree with the principle, I think it could be
possible to remove unnecessary queries from all providers (in time).

> And from what I inderstand from the code, It only prevents from checking
> for unique colomn in a view or materialized view.
>
> However, it looks the good option to deal with this use case, I mean no
> check (geometry type, srid, key column...) as soon as this option is set.

  That would make my patch much more simpler ;-)
  If I understand correctly, I can change my patch to skip geometry
type and srid check when they are saved in project already and when
option "trust project" is switched on?
(https://github.com/qgis/QGIS/pull/34738)

-- 
Tomas
___
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 "fast" mode

2020-03-14 Thread Tomas Straupis
2020-03-14, št, 13:58 Régis Haubourg rašė:
> Check the project property option named "trust". This is exactly what it is 
> supposed to do.
> I admit the wording is not nice, any better idea is welcome.

  You mean this one: "Trust project when data source has no metadata"?
  I read the wording that it tries to check metadata and if that is
unsuccessful - trusts project data. My idea is to not even try
re-checking in metadata or anywhere else - always use data from
project and only execute queries for actual job to be done (also do
not try to filter on geometry type etc).

  Practical example: even simple things like re-checking table columns
in metadata (oracle data dictionary) could take 10-15 seconds when we
have ~100 layers. And on very high load these 10-15 seconds are
unwanted (and they will never find anything different than data in
project file).

> @Tomas: are you sure it is doing full table scans? Most database have
> some 'metadata' or cached metadata tables which could be used for that.

  For geometry checking in our scenario it is doing very badly because
data comes from a view which is optimised to be used with spatial
filter (spatial queries take ~100ms), but when we try to query
distinct geometry types (even from random 100 rows) usage schema is
different and it takes ages. Haven't checked but I'm pretty sure it
involves full scans because it takes hours and we do not want to tune
the view with hints for geometry type checking as that will decrease
performance of actually useful queries fetching features.
___
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 "fast" mode

2020-03-14 Thread Tomas Straupis
Hello

  I would like to know opinion of QGIS developer community on the
question of "self-fixing queries" in the context of database layers.

  When you add a new database layer, QGIS queries required data, asks
user for other information and then saves it in the project file.
  Now when you re-open the project, QGIS is re-querying a lot of data
which is already saved in the project: geometry type, srid, attributes
(table columns/types).
  The downsides are:
  * these "re-checking" queries take considerable time on large
databases: with millions of records from 1minute up to several hours,
database is tuned - WMS/WFS queries finish in ~100ms.
  * in QGIS server environment these re-checking queries are executed
each time when apache launches a new QGIS server process
  * QGIS might by itself (without human interaction) decide to  work
differently compared to what it was asked to do when the project was
created if it finds that "something has changed"
  * re-checking during project opening is not 100% correct, as if
changes are possible in principle, then data/schema could change
during the time QGIS (Desktop/Server) is open/running
  * in environments other than development (testing, qa, production),
database schema should never change without some clear procedure which
should also include updating QGIS project files and testing them as
required, therefore such re-checkings should never be required on
testing/production environments.

  I do understand that the current situation/understanding is
different from mine, so in order to satisfy everybody, maybe it would
be feasible to add say an environment variable like QGIS_FAST=TRUE (or
QGIS_PRODUCTION=TRUE) and if this is set - re-checking queries could
be skipped? We've been running modified QGIS without re-checking in
production for months and are very happy with results. This should
also improve the benchmarks of QGIS Server as it is known that initial
opening of the project takes considerable amount of time.

  What is your opinion?

  Thank you

-- 
Tomas
___
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 Server: warnings vs info

2020-02-03 Thread Tomas Straupis
Hello

  While reading QGIS Server logs I wonder if this has some idea or is an error.

  After QGIS Server starts running ok I assume it is normal to change
QGIS_SERVER_LOG_LEVEL to 1 - do not show INFO type messages which
quickly go into hundreds of megs of text on a busy server.
  But if I understand correctly, some messages go into incorrect
levels thus both adding unnecessary info messages as well as hiding
important info.

  For example:
  1. Excessive warning level messages include:
  * formatString is: image/png (server/qgsrequesthandler.cpp)
  * Adding service SampleService 1.0, WCS 1.0.0 etc. etc.
(servce/qgsserviceregistry.cpp)

  2. Missing important info message:
  * The layer 'ABC' does not
exist. (services/wms/qgswmsserviceexception.h)

  Am I missing something?

  Thank you

-- 
Tomas
___
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 Oracle performance

2019-11-30 Thread Tomas Straupis
2019-11-30, št, 20:23 Alessandro Pasotti rašė:
> I don't know much about Oracle provider but I would say yes, there is also
> a setting named useEstimatedMetadata that should be used to tell the provider
> if we want to skip the deep and costly analysis and scans, at least in 
> postgres
> this works well, not sure about Oracle.

  Use estimated metadata option was switched ON in my tests.
  In Oracle provider this means that say extent is queried in meta
information views rather than being calculated from actual data.
  This option does not skip re-checking of layer metadata (at least in
Oracle provider).
  In Oracle there is no way (known to me) to save geometry type in
meta information views and querying geometry type using actual large
query (via view) without any filter is in my test very slow and not
actually required as geometry type is selected when selecting
table/view in "Add vector source" dialog.

-- 
Tomas
___
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 Oracle performance

2019-11-30 Thread Tomas Straupis
Hello

  I've made some performance test of QGIS Server + Oracle provider and
do not know how to proceed further. As I'm not sure if my thoughts are
correct, should I first discuss them here or should I open an issue on
GitHub?

  Question is about QgsOracleProvider::getGeometryDetails() which is
called when opening a project. This function does a number of queries
determining information of layers in a project. These queries can
sometimes be quite slow when working with large views joining tables
with millions of rows (in my test case they take 2-3 minutes).

  This procedure is called even when opening a project where this
information is already saved in project file. So the only purpose
could be to check if nothing has changed. But when project file is
used in QGIS Server, this adds 2-3 minutes of start time for each
server process. And the same 2-3 minutes are spent when during high
load apache adds a new QGIS server process to help with high load.
(The WMS/WFS related queries themselves are executed and response is
sent out in <1 second).

  Do I understand correctly, that skipping this re-testing should be
OK at least in server?

  I've tried skipping all recalculations and returning values from
project with a code like this in the start of getGeometryDetails()

  if ( mRequestedGeomType != QgsWkbTypes::Unknown && mSrid > 0 ) {
mHasSpatialIndex = true; // default value is false
mDetectedGeomType = mRequestedGeomType;
mValid = true;
return mValid;
  }

  And server processes are started in seconds instead of minutes. It
is also possible to open project file in QGIS Desktop, add new layers
etc.

-- 
Tomas
___
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 FCGI Server 3.9.0 - JPEG renders but PNG empty

2019-09-30 Thread Tomas Straupis
Hello, Tom

  You could probably try the method described by Jorge in QGIS-user list:

  1. Compile QGIS with debug info.

  2. Create a script with all FcgidInitialEnv taken from apache config
converted to export's like:
  export QGIS_SERVER_LOG_FILE=/tmp/qgis-000.log

  3. Add query string variable and project file:
  export QUERY_STRING="SERVICE=WMS=1.3.0=GetCapabilities"
  export QGIS_PROJECT_FILE="/var/www/wms/oracle.qgs"

  4. execute qgis_mapserv.fcgi with debug on:
  export QGIS_DEBUG=9
  export QGIS_LOG_FILE=/tmp/qgis.log
 ./qgis_mapserv.fcgi

  This gives both server logs as well as debug information in separate
files.

-- 
Tomas
___
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