[QGIS-Developer] 2 questions on saving rasters in 3.4

2019-01-23 Thread Andreas Neumann
Hi, 

I have two questions about saving rasters in QGIS 3.4: 

1. 


If I use "Right-klick layer" --> "Export" --> "Save AS" then I can't
choose the ESRI ASCII Grid format described in "Settings" --> "Options"
--> "GDAL" as "AAIGrid". 

Any idea why this format is not available for exporting rasters? 

2. 


As an alternative I can use the "Raster" --> "Extraction" --> "Clip
raster by extent". This works fine, but I can't set the number of
decimal places after the comma. 


E.g. if I export a terrain model I would like to use 2-3 places after
the decimal, not the full 8 digits, which is a false accuracy. 

Any way I can set the accuracy for the export? 

Thanks, 


Andreas___
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] Vertex tool and cache invalidation

2019-01-23 Thread Martin Dobias
Hi Hugo

(finally coming back to the earlier thread now)

On Mon, Jan 7, 2019 at 4:14 PM Hugo Mercier  wrote:
> >
> > Are the issues you mentioned solved now by your PR
> > https://github.com/qgis/QGIS/pull/8724 or that was some other separate
> > issue?
>
> Unfortunately, this only solves a very small part of the problem. The
> overall issue of wrong cache synchronization is still there.

So what are the missing pieces of the puzzle? With data dependencies
defined in QGIS, I would expect that edit of a geometry in a layer
should trigger dataChanged() signal, so any piece of QGIS that caches
any data is notified that caches should be invalidated... isn't this
the case?


> > For your open question with "click first" behavior of vertex tool as
> > an option - I don't know. There has been some interest to address some
> > ergonomic issues in the new implementation, but I am not sure yet what
> > we would end up doing...
>
> I understand. I am still looking for a solution here.
>
> So instead of resurrecting the old vertex tool, would it be possible to
> make it work without index/cache ?
> I understand a cache has been introduced to allow for edition when lots
> of geometries are displayed on the current extent. But usually geometry
> editions are made at a high level of details, when a few geometry
> features are visible. Is a cache still needed if we somehow enforce the
> edition to be allowed only at small scale ?

I am not sure I understand what is the problem with cache... attribute
table has its cache, vector joins have caches, snapping has its cache,
so vertex tool has its cache too to make things faster. As long as we
can detect that the cache needs to be invalidated, there should not be
a problem. Could you please shed some light where is the source of the
troubles you are having?

Cheers
Martin
___
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] Plugin [1615] HEREqgis approval notification.

2019-01-23 Thread noreply

Plugin HEREqgis approval by pcav.
The plugin version "[1615] HEREqgis 0.1.1 Experimental" is now approved
Link: http://plugins.qgis.org/plugins/HEREqgis/
___
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] Plugin [500] Vgi2Shp approval notification.

2019-01-23 Thread noreply

Plugin Vgi2Shp approval by pcav.
The plugin version "[500] Vgi2Shp 3.0.1" is now approved
Link: http://plugins.qgis.org/plugins/Vgi2ShpConverter/
___
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] Plugin [1313] AGT - Archaeological Geophysics Toolbox approval notification.

2019-01-23 Thread noreply

Plugin AGT - Archaeological Geophysics Toolbox approval by pcav.
The plugin version "[1313] AGT - Archaeological Geophysics Toolbox 2.0" is now 
approved
Link: http://plugins.qgis.org/plugins/AGT/
___
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] WFS and NULL values

2019-01-23 Thread Alessandro Pasotti
Correct,  thanks for pointing that out!

On Wed, Jan 23, 2019 at 11:45 AM Even Rouault 
wrote:

> On mercredi 23 janvier 2019 11:42:19 CET Alessandro Pasotti wrote:
> > Thanks for all the comments!
> >
> > I understand that it depends on the schema, what confuses me is the
> > assertion by Andrea in the (quite old) cited email that  "GML and WFS
> > explicitly avoid the use of "xs:nil", I could not find any authoritative
> > support for that claim.
> >
> > So, if that is not the case, we should probably fix QGIS Server's
> > DescribeFeatureType to return something like this (for a nillable
> element):
> >
> > 
> >
> > And for the getFeature response, in case the value is NULL:
> >
> > 
>
> If you want to be able to set xsi:nil="true", the XSD element declaration
> must
> have the nillable="true" attribute.
> minOccurs="0" is to allow the element to be completely absent.
>
> >
> > How does it sounds?
> >
> >
> > On Wed, Jan 23, 2019 at 11:02 AM Even Rouault <
> even.roua...@spatialys.com>
> >
> > wrote:
> > > Recent versions of OGR make a difference between :
> > >
> > > - a missing XML element, that will be represented in OGR as a "unset
> > > field")
> > > (allowed if the schema has minOccurs="0")
> > > - and a XML element set to , that will be
> represented
> > > in
> > > OGR as a NULL field value (allowed if the schema has nillable="true")
> > >
> > > ( see https://trac.osgeo.org/gdal/wiki/rfc67_nullfieldvalues )
> > >
> > > The same for JSon actually, between a property that doesn't appear at
> all,
> > > or
> > > which is set to null.
> > >
> > > Example, given foo.json with
> > >
> > > { "type": "FeatureCollection",
> > >
> > >   "features": [
> > >
> > > { "type": "Feature", "properties": { "a": 1, "null_prop": null },
> > >
> > > "geometry": null },
> > >
> > > { "type": "Feature", "properties": { "b": 2 }, "geometry": null }
> > >
> > >   ]
> > >
> > > }
> > >
> > > $ ogr2ogr foo.gml foo.json -f gml
> > >
> > > $ cat foo.gml
> > > 
> > >  > >
> > >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
> > >  xsi:schemaLocation="http://ogr.maptools.org/ foo.xsd"
> > >  xmlns:ogr="http://ogr.maptools.org/;
> > >  xmlns:gml="http://www.opengis.net/gml;>
> > >
> > >   missing
> > >
> > >   
> > >
> > > 
> > >
> > >   1
> > >   
> > >
> > > 
> > >
> > >   
> > >   
> > >
> > > 
> > >
> > >   2
> > >
> > > 
> > >
> > >   
> > >
> > > 
> > >
> > > $ ogr2ogr out.json foo.gml
> > >
> > > $ ogrinfo foo.gml -al
> > > INFO: Open of `foo.gml'
> > >
> > >   using driver `GML' successful.
> > >
> > > Layer name: foo
> > > Geometry: Unknown (any)
> > > Feature Count: 2
> > > Layer SRS WKT:
> > > (unknown)
> > > Geometry Column = geometryProperty
> > > fid: String (0.0) NOT NULL
> > > a: Integer (16.0)
> > > null_prop: String (0.0)
> > > b: Integer (16.0)
> > > OGRFeature(foo):0
> > >
> > >   fid (String) = foo.0
> > >   a (Integer) = 1
> > >   null_prop (String) = (null)
> > >
> > > OGRFeature(foo):1
> > >
> > >   fid (String) = foo.1
> > >   b (Integer) = 2
> > >
> > > And yes this is not WFS or GML specific, but XML + XML-Schema generic.
> > >
> > > --
> > > Spatialys - Geospatial professional services
> > > http://www.spatialys.com
>
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
>


-- 
Alessandro Pasotti
w3:   www.itopen.it
___
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] WFS and NULL values

2019-01-23 Thread Even Rouault
On mercredi 23 janvier 2019 11:42:19 CET Alessandro Pasotti wrote:
> Thanks for all the comments!
> 
> I understand that it depends on the schema, what confuses me is the
> assertion by Andrea in the (quite old) cited email that  "GML and WFS
> explicitly avoid the use of "xs:nil", I could not find any authoritative
> support for that claim.
> 
> So, if that is not the case, we should probably fix QGIS Server's
> DescribeFeatureType to return something like this (for a nillable element):
> 
> 
> 
> And for the getFeature response, in case the value is NULL:
> 
> 

If you want to be able to set xsi:nil="true", the XSD element declaration must 
have the nillable="true" attribute.
minOccurs="0" is to allow the element to be completely absent.

> 
> How does it sounds?
> 
> 
> On Wed, Jan 23, 2019 at 11:02 AM Even Rouault 
> 
> wrote:
> > Recent versions of OGR make a difference between :
> > 
> > - a missing XML element, that will be represented in OGR as a "unset
> > field")
> > (allowed if the schema has minOccurs="0")
> > - and a XML element set to , that will be represented
> > in
> > OGR as a NULL field value (allowed if the schema has nillable="true")
> > 
> > ( see https://trac.osgeo.org/gdal/wiki/rfc67_nullfieldvalues )
> > 
> > The same for JSon actually, between a property that doesn't appear at all,
> > or
> > which is set to null.
> > 
> > Example, given foo.json with
> > 
> > { "type": "FeatureCollection",
> > 
> >   "features": [
> >   
> > { "type": "Feature", "properties": { "a": 1, "null_prop": null },
> > 
> > "geometry": null },
> > 
> > { "type": "Feature", "properties": { "b": 2 }, "geometry": null }
> >   
> >   ]
> > 
> > }
> > 
> > $ ogr2ogr foo.gml foo.json -f gml
> > 
> > $ cat foo.gml
> > 
> >  > 
> >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
> >  xsi:schemaLocation="http://ogr.maptools.org/ foo.xsd"
> >  xmlns:ogr="http://ogr.maptools.org/;
> >  xmlns:gml="http://www.opengis.net/gml;>
> >   
> >   missing
> >   
> >   
> >   
> > 
> > 
> >   1
> >   
> > 
> > 
> >   
> >   
> >   
> >   
> > 
> > 
> >   2
> > 
> > 
> >   
> >   
> > 
> > 
> > 
> > $ ogr2ogr out.json foo.gml
> > 
> > $ ogrinfo foo.gml -al
> > INFO: Open of `foo.gml'
> > 
> >   using driver `GML' successful.
> > 
> > Layer name: foo
> > Geometry: Unknown (any)
> > Feature Count: 2
> > Layer SRS WKT:
> > (unknown)
> > Geometry Column = geometryProperty
> > fid: String (0.0) NOT NULL
> > a: Integer (16.0)
> > null_prop: String (0.0)
> > b: Integer (16.0)
> > OGRFeature(foo):0
> > 
> >   fid (String) = foo.0
> >   a (Integer) = 1
> >   null_prop (String) = (null)
> > 
> > OGRFeature(foo):1
> > 
> >   fid (String) = foo.1
> >   b (Integer) = 2
> > 
> > And yes this is not WFS or GML specific, but XML + XML-Schema generic.
> > 
> > --
> > Spatialys - Geospatial professional services
> > http://www.spatialys.com


-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
___
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] WFS and NULL values

2019-01-23 Thread Alessandro Pasotti
Thanks for all the comments!

I understand that it depends on the schema, what confuses me is the
assertion by Andrea in the (quite old) cited email that  "GML and WFS
explicitly avoid the use of "xs:nil", I could not find any authoritative
support for that claim.

So, if that is not the case, we should probably fix QGIS Server's
DescribeFeatureType to return something like this (for a nillable element):



And for the getFeature response, in case the value is NULL:



How does it sounds?


On Wed, Jan 23, 2019 at 11:02 AM Even Rouault 
wrote:

> Recent versions of OGR make a difference between :
>
> - a missing XML element, that will be represented in OGR as a "unset
> field")
> (allowed if the schema has minOccurs="0")
> - and a XML element set to , that will be represented
> in
> OGR as a NULL field value (allowed if the schema has nillable="true")
>
> ( see https://trac.osgeo.org/gdal/wiki/rfc67_nullfieldvalues )
>
> The same for JSon actually, between a property that doesn't appear at all,
> or
> which is set to null.
>
> Example, given foo.json with
>
> { "type": "FeatureCollection",
>   "features": [
> { "type": "Feature", "properties": { "a": 1, "null_prop": null },
> "geometry": null },
> { "type": "Feature", "properties": { "b": 2 }, "geometry": null }
>   ]
> }
>
> $ ogr2ogr foo.gml foo.json -f gml
>
> $ cat foo.gml
> 
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>  xsi:schemaLocation="http://ogr.maptools.org/ foo.xsd"
>  xmlns:ogr="http://ogr.maptools.org/;
>  xmlns:gml="http://www.opengis.net/gml;>
>   missing
>
>   
> 
>   1
>   
> 
>   
>   
> 
>   2
> 
>   
> 
>
> $ ogr2ogr out.json foo.gml
>
> $ ogrinfo foo.gml -al
> INFO: Open of `foo.gml'
>   using driver `GML' successful.
>
> Layer name: foo
> Geometry: Unknown (any)
> Feature Count: 2
> Layer SRS WKT:
> (unknown)
> Geometry Column = geometryProperty
> fid: String (0.0) NOT NULL
> a: Integer (16.0)
> null_prop: String (0.0)
> b: Integer (16.0)
> OGRFeature(foo):0
>   fid (String) = foo.0
>   a (Integer) = 1
>   null_prop (String) = (null)
>
> OGRFeature(foo):1
>   fid (String) = foo.1
>   b (Integer) = 2
>
>
> And yes this is not WFS or GML specific, but XML + XML-Schema generic.
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
>


-- 
Alessandro Pasotti
w3:   www.itopen.it
___
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] Plugin [1615] HEREqgis approval notification.

2019-01-23 Thread noreply

Plugin HEREqgis approval by NathanW.
The plugin version "[1615] HEREqgis 0.1 Experimental" is now approved
Link: http://plugins.qgis.org/plugins/HEREqgis/
___
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] WFS and NULL values

2019-01-23 Thread Even Rouault
Recent versions of OGR make a difference between :

- a missing XML element, that will be represented in OGR as a "unset field") 
(allowed if the schema has minOccurs="0")
- and a XML element set to , that will be represented in 
OGR as a NULL field value (allowed if the schema has nillable="true")

( see https://trac.osgeo.org/gdal/wiki/rfc67_nullfieldvalues )

The same for JSon actually, between a property that doesn't appear at all, or 
which is set to null.

Example, given foo.json with

{ "type": "FeatureCollection",
  "features": [
{ "type": "Feature", "properties": { "a": 1, "null_prop": null }, 
"geometry": null },
{ "type": "Feature", "properties": { "b": 2 }, "geometry": null }
  ]
}

$ ogr2ogr foo.gml foo.json -f gml

$ cat foo.gml

http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation="http://ogr.maptools.org/ foo.xsd"
 xmlns:ogr="http://ogr.maptools.org/;
 xmlns:gml="http://www.opengis.net/gml;>
  missing




  

  1
  

  
  

  2

  


$ ogr2ogr out.json foo.gml

$ ogrinfo foo.gml -al
INFO: Open of `foo.gml'
  using driver `GML' successful.

Layer name: foo
Geometry: Unknown (any)
Feature Count: 2
Layer SRS WKT:
(unknown)
Geometry Column = geometryProperty
fid: String (0.0) NOT NULL
a: Integer (16.0)
null_prop: String (0.0)
b: Integer (16.0)
OGRFeature(foo):0
  fid (String) = foo.0
  a (Integer) = 1
  null_prop (String) = (null)

OGRFeature(foo):1
  fid (String) = foo.1
  b (Integer) = 2


And yes this is not WFS or GML specific, but XML + XML-Schema generic.

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
___
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] WFS and NULL values

2019-01-23 Thread Alessandro Pasotti
On Wed, Jan 23, 2019 at 9:31 AM René-Luc Dhont  wrote:

> Hi Allessandro,
>
> Do you speak about these PR:
> * https://github.com/qgis/QGIS/pull/8536 [Server] Null field value in GML
> has to be empty string 2.18
> * https://github.com/qgis/QGIS/pull/8537 [Server][WFS] Null field value
> in GML has to be empty string 3.4
>
> I don't think it is a GML specific issue, but something about XSD and XML.
>

Hi René-Luc,

thank you for you reply,

no, I'm talking about this:

image you have a field named "typ" with a NULL value, the XML should not
contain that value at all, currently we get this:

22Oebisfelder
Straße

while I think that we should get that:

22Oebisfelder Straße

In other words: if a field is NULL it should not be empty but completely
omitted from the resulting GML (I suppose this is to make a difference
between empty and null in case of not-numeric fields).



>
> Regards,
> René-Luc
>
> Le 23/01/2019 à 09:14, Paul Blottiere a écrit :
>
> Hi Alessandro,
>
> > If it is a bug I can work on the fix, but maybe I'm missing something.
>
> Have you taken a look to the compliance OGC tests for WFS 1.X? If there's
> tests about this particular point, we'll know for sure if it's something to
> fix.
>
> Regards.
>
> Paul
>
> Le mar. 22 janv. 2019 à 17:51, Alessandro Pasotti  a
> écrit :
>
>> Hi all,
>>
>> while working on QGIS server I noticed that WFS GetFeature returns NULL
>> values as empty tags while according to the majority of the sources I've
>> found it should not include it in the XML response (GML2 at least, I'm not
>> sure about GML3 yet).
>>
>> If it is a bug I can work on the fix, but maybe I'm missing something.
>>
>> See:
>> http://osgeo-org.1560.x6.nabble.com/Why-the-WFS-does-not-return-the-NULL-value-field-td3802398.html
>>
>> apparently this is also what geoserver does.
>>
>> Any opinion?
>>
>> --
>> Alessandro Pasotti
>> w3:   www.itopen.it
>>
>
>

-- 
Alessandro Pasotti
w3:   www.itopen.it
___
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] WFS and NULL values

2019-01-23 Thread René-Luc Dhont

Hi Allessandro,

Do you speak about these PR:
* https://github.com/qgis/QGIS/pull/8536 [Server] Null field value in 
GML has to be empty string 2.18
* https://github.com/qgis/QGIS/pull/8537 [Server][WFS] Null field value 
in GML has to be empty string 3.4


I don't think it is a GML specific issue, but something about XSD and XML.

Regards,
René-Luc

Le 23/01/2019 à 09:14, Paul Blottiere a écrit :

Hi Alessandro,

> If it is a bug I can work on the fix, but maybe I'm missing something.

Have you taken a look to the compliance OGC tests for WFS 1.X? If 
there's tests about this particular point, we'll know for sure if it's 
something to fix.


Regards.

Paul

Le mar. 22 janv. 2019 à 17:51, Alessandro Pasotti > a écrit :


Hi all,

while working on QGIS server I noticed that WFS GetFeature returns
NULL values as empty tags while according to the majority of the
sources I've found it should not include it in the XML response
(GML2 at least, I'm not sure about GML3 yet).

If it is a bug I can work on the fix, but maybe I'm missing something.

See:

http://osgeo-org.1560.x6.nabble.com/Why-the-WFS-does-not-return-the-NULL-value-field-td3802398.html

apparently this is also what geoserver does.

Any opinion?

-- 
Alessandro Pasotti

w3: www.itopen.it 



___
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] WFS and NULL values

2019-01-23 Thread Alessandro Pasotti
No, I haven't, thanks for pointing that out

I'm looking now at http://test.qgis.org/ogc_cite/wfs_110/latest/report.html
but I can't find the test about NULL values, do you remember exactly where
it is?


On Wed, Jan 23, 2019 at 9:15 AM Paul Blottiere 
wrote:

> Hi Alessandro,
>
> > If it is a bug I can work on the fix, but maybe I'm missing something.
>
> Have you taken a look to the compliance OGC tests for WFS 1.X? If there's
> tests about this particular point, we'll know for sure if it's something to
> fix.
>
> Regards.
>
> Paul
>
> Le mar. 22 janv. 2019 à 17:51, Alessandro Pasotti  a
> écrit :
>
>> Hi all,
>>
>> while working on QGIS server I noticed that WFS GetFeature returns NULL
>> values as empty tags while according to the majority of the sources I've
>> found it should not include it in the XML response (GML2 at least, I'm not
>> sure about GML3 yet).
>>
>> If it is a bug I can work on the fix, but maybe I'm missing something.
>>
>> See:
>> http://osgeo-org.1560.x6.nabble.com/Why-the-WFS-does-not-return-the-NULL-value-field-td3802398.html
>>
>> apparently this is also what geoserver does.
>>
>> Any opinion?
>>
>> --
>> Alessandro Pasotti
>> w3:   www.itopen.it
>>
>

-- 
Alessandro Pasotti
w3:   www.itopen.it
___
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