[Qgis-user] set Z component of PointZ from field

2019-09-03 Thread Andreas Plesch
Hello, I would like to modify the z coordinate of a PointZ layer using a field.

In qgis 2.18 I could do that with a field function, and using .setZ on
the feature as a side effect of a field calculator invocation.

The field function looked like this:

@qgsfunction(args='auto', group='Custom')
def setZtoValue(newZ, feature, parent):
 """ This function sets the Z coordinate to the provided value and
returns the new point. """
 point = feature.geometry().geometry()
 point.setZ(newZ)
 return feature.geometry()

However, in qgis 3.4 I cannot figure out the equivalent field function
since the API changed. Here is what I have:

def setZtoValue(newZ, feature, parent):
  """ This function sets the Z coordinate to the provided value and
returns the new point. """
  verts = feature.geometry().constGet().vertices()
  for v in verts:
v.setZ(newZ)
  return feature.geometry()

[never mind the formatting]

This does something but then at the end I get this error:

An error occurred while evaluating the calculation string: 'NoneType'
object has no attribute 'vertices'

and the z component is not updated.

There are other ways to load in 3d points as 3d geometry but the flow
of loading the map points with an elevation/depth field, and then just
populating the z coordinate with the field value may  suggest itself
first.

I know one can construct wkt to import, or perhaps generate new
geometry in a script and replace the existing geometry, but just
updating the the existing z would seem most straightforward. Is it
possible ?

Any feedback much appreciated, -Andreas






--
Andreas Plesch
Waltham, MA 02453
___
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] Aligning georeferenced USGS historical map

2018-11-19 Thread Andreas Plesch
It looks like the GeoTIFF at
https://ngmdb.usgs.gov/ht-bin/tv_download.pl?id=5504707&tif=true

actually uses an (almost) correct projection:


PROJCS["Polyconic",GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwi
ch",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Polyconic"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-122.625],PAR

AMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1]]

and proj knows about polyconic:

https://proj4.org/operations/projections/poly.html

Since the geoTIFF projection mentions NAD 1927, perhaps the main issue the
datum shift mentioned on the map.

So I tried to find out about the datum actually used for the printed map
and found this:

https://historicalcharts.noaa.gov/links.html

linking to

https://historicalcharts.noaa.gov/pdfs/AR1853_Appendix39.pdf

Page 101 has a table of constant used for the polyconic projection
including the ellipsoid parameters (older than Clarke 1866).

With that a new custom projection can be defined:

+proj=poly +lat_0=0 +lon_0=-122.625 +x_0=0 +y_0=0 +a=6377397.16
+b=6356078.96 +units=m +no_defs


and assigned to the geoTIFF (without warping), replacing the NAD27 datum
definition.


Interestingly, this change shifts the map ca. 690ft north, and makes it
align better but not perfectly with modern maps. The purple tinted map
below is using the new custom projection, using on the on the fly
reprojection which may not be accurate enough.


 image.png
<https://drive.google.com/file/d/0BwIhFzkLaQ9Xd1pPd1FNTHM5WWplQTZVcHJ0S2pOUFFPM3Fz/view?usp=drive_web>


I think the dotted lines at the northern margin may correspond to the
location of the minute grid in the then new NAD 1927 datum. For the actual
corners, I think, another ellipsoid was used, probably the one above.

In the end, it may be necessary to just guess the true location of
landmarks on the map such as road intersections or bends, or the coastline,
and regeoreference using spline warping.

-Andreas

On Fri, Nov 16, 2018 at 8:36 AM Andreas Plesch 
wrote:

> Looking at
>
>
> https://ngmdb.usgs.gov/img4/ht_icons/Browse/CA/CA_Tamalpais_301790_1897_62500.jpg
>
> there is a note in the lower right corner:
>
> Polyconic projection. To place on North American datum, move projection
> lines 690 ft south and 320 ft west.
>
> https://en.m.wikipedia.org/wiki/American_polyconic_projection
>
> explains the projection.
>
> Unfortunately, the map does not mention which central meridian was chosen
> for the projection. It may be possible to find if at the time a single one
> was used for all of CA and what it would be.
>
> It should also be straightforward to determine if proj  and therefore qgis
> supports the polyconic projection. It probably does.
>
> With that you can define a custom projection. Perhaps there is an EPSG
> code but I could not find it.
>
> EPSG 9818 seems to encode this projection although it does not seem to
> include the actual method in the registration.
>
> After you have defined a closely matching projection, you can translate
> the minute grid points to projected coordinates and georeference.
>
> The other mystery is the note about the datum shift. What are projection
> lines and what datum is used for the printed map ? The mentioned North
> American datum may be NAD27.
>
> Andreas
>
>
> From: Morgan Fletcher 
>
>> To: qgis-user@lists.osgeo.org
>> Subject: [Qgis-user] Aligning georeferenced USGS historical maps
>> Message-ID:
>> <
>> capwdt1u+tme7cjr4gf63e13mpapywo9nsbzochj2r8ng80d...@mail.gmail.com>
>> Content-Type: text/plain; charset="utf-8"
>>
>> I am new to GIS, an amateur who is curious about old roads. I have QGIS
>> 3.4.0 installed on OS-X 10.13.6 using the pre-built binaries available
>> from
>> https://download.qgis.org/. If I visit the USGS topoView
>> <https://ngmdb.usgs.gov/topoview/> page and download a historic map, for
>> instance the geotiff archive from Tamalpais, CA 1897 (1950 ed.)
>> <https://ngmdb.usgs.gov/topoview/viewer/#10/37.8564/-122.6336>, I can
>> add a
>> raster layer with the .tif file from the archive and it will be placed in
>> rough correspondence with a base map in my QGIS project. In my case my
>> basemap is OpenStreetMap. (crs=EPSG:3857&format&type=xyz&url=
>> http://a.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png&zmax=19&zmin=0
>> )
>> The problem is that the maps don't line up, visually. For example:
>>
>>
>>  Screen Shot 2018-11-02 at 8.51.02 AM.png
>> <
>> https:/

Re: [Qgis-user] Aligning georeferenced USGS historical map

2018-11-16 Thread Andreas Plesch
Looking at

https://ngmdb.usgs.gov/img4/ht_icons/Browse/CA/CA_Tamalpais_301790_1897_62500.jpg

there is a note in the lower right corner:

Polyconic projection. To place on North American datum, move projection
lines 690 ft south and 320 ft west.

https://en.m.wikipedia.org/wiki/American_polyconic_projection

explains the projection.

Unfortunately, the map does not mention which central meridian was chosen
for the projection. It may be possible to find if at the time a single one
was used for all of CA and what it would be.

It should also be straightforward to determine if proj  and therefore qgis
supports the polyconic projection. It probably does.

With that you can define a custom projection. Perhaps there is an EPSG code
but I could not find it.

EPSG 9818 seems to encode this projection although it does not seem to
include the actual method in the registration.

After you have defined a closely matching projection, you can translate the
minute grid points to projected coordinates and georeference.

The other mystery is the note about the datum shift. What are projection
lines and what datum is used for the printed map ? The mentioned North
American datum may be NAD27.

Andreas


From: Morgan Fletcher 

> To: qgis-user@lists.osgeo.org
> Subject: [Qgis-user] Aligning georeferenced USGS historical maps
> Message-ID:
> <
> capwdt1u+tme7cjr4gf63e13mpapywo9nsbzochj2r8ng80d...@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> I am new to GIS, an amateur who is curious about old roads. I have QGIS
> 3.4.0 installed on OS-X 10.13.6 using the pre-built binaries available from
> https://download.qgis.org/. If I visit the USGS topoView
>  page and download a historic map, for
> instance the geotiff archive from Tamalpais, CA 1897 (1950 ed.)
> , I can add
> a
> raster layer with the .tif file from the archive and it will be placed in
> rough correspondence with a base map in my QGIS project. In my case my
> basemap is OpenStreetMap. (crs=EPSG:3857&format&type=xyz&url=
> http://a.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png&zmax=19&zmin=0
> )
> The problem is that the maps don't line up, visually. For example:
>
>
>  Screen Shot 2018-11-02 at 8.51.02 AM.png
> <
> https://drive.google.com/a/hahaha.org/file/d/0B-OybZpGWIkHUWhuWEZLS2xWZEhTUC1MMkN4X2dfZGkxQm1J/view?usp=drive_web
> >
>
>
> I can solve it better with georeferencer. Before I viewed Hans van der
> Kwast's excellent Georeferencing a scanned map and digitizing vectors in
> QGIS  video, I simply started finding common
> points; now I understand that using the correct CRS, projection and the
> grid is perhaps perhaps the best strategy.
>
> My questions are:
>
>
>- If I download a geotiff archive from topoView, is QGIS 3.4.0 correctly
>parsing the data in the .tif file, or the other files (.prj, .tfw) in
> the
>extracted directory, and placing the map correctly? Can it be adjusted
> to
>align better, and if so, how?
>- Should I use EPSG:26710 for the Tamalpais
> map, and
>attempt to georeference it myself, using its minute grid? Why does the
> map
>border show a skew at the top left and right corners? (see below)
>- I have found that, to get a hand-drawn, antique map to align with a
>modern base map, I often have to add so many points in georeferencer
> that
>the rendered map has to be very distorted. What is the best method to
> get
>old maps to line up, so that historical roads can be related to modern
>roads?
>
> Skew mentioned in second point:
>
>
>  Screen Shot 2018-11-08 at 8.20.56 AM.png
> <
> https://drive.google.com/a/hahaha.org/file/d/0B-OybZpGWIkHeEE0aDMyQVFCZ0F1R01pRGhKeEJVTzYxaEpj/view?usp=drive_web
> >
>
>
> I couldn't find a searchable archive of qgis-user; my apologies if these
> are already answered somewhere. I did ask a variation of these questions on
> StackExchange
>  >,
> where it was heavily edited by 'Vince', and has no answers after a week, so
> asking here.
>
> Morgan
> -- next part --
> An HTML attachment was scrubbed...
> URL: <
> http://lists.osgeo.org/pipermail/qgis-user/attachments/20181108/3300eb80/attachment.html
> >
>
> --
>
> Subject: Digest Footer
>
> ___
> 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
>
> --
>
> End of Qgis-user Digest, Vol 153, Issue 23
> **
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/m

[Qgis-user] multipart to singlepart Z fix for 2.18

2017-07-12 Thread Andreas Plesch
Looking at the source, 2.99 seems to fix the issue that the multipart to
singlepart vector geometry tool does not preserve Z values for 3d
geometries. 2.18.10 seems to still have this issue, at least 2.18.3 has it.

It turns out that it is straightforward to backport the 2.99 fix to 2.18,
so I thought it may be useful to share the fix:

After backing up the installed

qgis/python/plugins/processing/algs/qgis/MultipartToSingleparts.py

file, edit this file at the bottom (with notepad++ or emacs) and change the
function extractAsSingle to (this much shorter) definition:

def extractAsSingle(self, geom):
   print('multipart2single: use .asGeometryCollection')
   multiGeom = QgsGeometry()
   geometries = []
   if geom.isMultipart():
   multiGeom = geom.asGeometryCollection()
   for g in multiGeom:
   geometries.append(g)
   else:
   geometries.append(geom)
   return geometries

.asGeometryCollection() preserves Z, while the original .as or .from
methods do not.

Also rename the corresponing MultipartToSinglePart.pyc and .pyo files to
something else.

Restart qgis and try it out. This is only tested on linux and with
MultiPointZ but may work with other types as well.

Good luck,

Andreas

PS: I did not submit this as a PR to the github repo since the issue seems
already fixed and the strict requirements for a PR.
___
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] wkt multipoint via delimited text requires internal parens

2017-07-12 Thread Andreas Plesch
It looks like the regex in
https://qgis.org/api/qgsmultipoint_8cpp_source.html#l00037
does not work this case. Although it should, hm.
Was it fixed for 2.99 ? . Let's see:
http://qgis.org/api/2.18/qgsmultipointv2_8cpp_source.html#l00037
Yes ! The regex for 2.18 does not recognize the '-', and therefore does not
recognize the 'non-standard' wkt form.
Looks like no need for a bug report then. Maybe I have missed an existing
one (?).
2.18.10 should also work as it has the fixed regex:
https://github.com/qgis/QGIS/blob/final-2_18_10/src/core/geometry/qgsmultipointv2.cpp#L37
Too bad, on my gentoo system >2.18.3 does not work anymore due to qt5
issues, I think.
Well, all cleared up then.
-Andreas
PS: Thinking about the regex, it should probably recognize '+' as well:
MULTIPOINT(+4 4, 5 5) may not work now. Hm, and '.' as in (.4 0.5, .1 .06)
What about testing for the 'standard' wkt form by looking for double
parentheses with '(\\s*(' instead ?


On Wed, Jul 12, 2017 at 10:05 AM, Andreas Plesch  wrote:

> Hi, I could narrow down the error to negative coordinates:
>
> This works on the console:
> >>> QgsGeometry.fromWkt('MULTIPOINTZ(2 2 4,3 3 4)').exportToWkt()
> u'MultiPointZ ((2 2 4),(3 3 4))'
>
> But this does not:
>
> >>> QgsGeometry.fromWkt('MULTIPOINTZ(-2 2 4,3 3 4)').exportToWkt()
> Traceback (most recent call last):
>   File "", line 1, in 
> AttributeError: 'NoneType' object has no attribute 'exportToWkt'
>
> So negative coordinates do not work without parentheses, surprisingly.
> Perhaps some oversight in parsing.
>
> But negative coordinates work with parentheses:
>
> >>> QgsGeometry.fromWkt('MULTIPOINTZ((-2 2 4),(3 3 4))').exportToWkt()
> u'MultiPointZ ((-2 2 4),(3 3 4))'
>
> If there are no objections, I will file a report on the bug tracker.
>
> -Andreas
>
>
> On Tue, Jul 11, 2017 at 7:09 PM, Andreas Plesch <
> andreasple...@netscape.net> wrote:
>
>> Hi
>>
>> Using 2.18.3, I found that Add Delimited Text Layer required a WKT of the
>> form:
>>
>> MULTIPOINT Z ((-119.00 34.82 1487),(-119.01 34.81 1450))
>>
>> rather than just
>>
>> MULTIPOINT Z (-119.00 34.82 1487,-119.01 34.81 1450)
>>
>> without the internal parentheses which is also allowed, and perhaps more
>> common.
>>
>> I searched through the bug tracker for 'MULTIPOINT' but could not find a
>> relevant issue.
>>
>> Did anybody come across this ?
>>
>> On a related note, I did this in order to convert a LINESTRINGZ to POINTZ
>> since the Extract Nodes tool did not preserve Z. CSV Exporting, text
>> editing and reimporting as MULTIPOINTZ seemed the easiest option. Is there
>> another option ?
>>
>> Thanks, Andreas
>>
>> --
>> Andreas Plesch
>> 39 Barbara Rd.
>> Waltham, MA 02453
>>
>>
>>
>
___
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] wkt multipoint via delimited text requires internal parens

2017-07-12 Thread Andreas Plesch
Hi, I could narrow down the error to negative coordinates:

This works on the console:
>>> QgsGeometry.fromWkt('MULTIPOINTZ(2 2 4,3 3 4)').exportToWkt()
u'MultiPointZ ((2 2 4),(3 3 4))'

But this does not:

>>> QgsGeometry.fromWkt('MULTIPOINTZ(-2 2 4,3 3 4)').exportToWkt()
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'NoneType' object has no attribute 'exportToWkt'

So negative coordinates do not work without parentheses, surprisingly.
Perhaps some oversight in parsing.

But negative coordinates work with parentheses:

>>> QgsGeometry.fromWkt('MULTIPOINTZ((-2 2 4),(3 3 4))').exportToWkt()
u'MultiPointZ ((-2 2 4),(3 3 4))'

If there are no objections, I will file a report on the bug tracker.

-Andreas


On Tue, Jul 11, 2017 at 7:09 PM, Andreas Plesch 
wrote:

> Hi
>
> Using 2.18.3, I found that Add Delimited Text Layer required a WKT of the
> form:
>
> MULTIPOINT Z ((-119.00 34.82 1487),(-119.01 34.81 1450))
>
> rather than just
>
> MULTIPOINT Z (-119.00 34.82 1487,-119.01 34.81 1450)
>
> without the internal parentheses which is also allowed, and perhaps more
> common.
>
> I searched through the bug tracker for 'MULTIPOINT' but could not find a
> relevant issue.
>
> Did anybody come across this ?
>
> On a related note, I did this in order to convert a LINESTRINGZ to POINTZ
> since the Extract Nodes tool did not preserve Z. CSV Exporting, text
> editing and reimporting as MULTIPOINTZ seemed the easiest option. Is there
> another option ?
>
> Thanks, Andreas
>
> --
> Andreas Plesch
> 39 Barbara Rd.
> Waltham, MA 02453
>
>
>
___
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] wkt multipoint via delimited text requires internal parens

2017-07-11 Thread Andreas Plesch
Hi

Using 2.18.3, I found that Add Delimited Text Layer required a WKT of the
form:

MULTIPOINT Z ((-119.00 34.82 1487),(-119.01 34.81 1450))

rather than just

MULTIPOINT Z (-119.00 34.82 1487,-119.01 34.81 1450)

without the internal parentheses which is also allowed, and perhaps more
common.

I searched through the bug tracker for 'MULTIPOINT' but could not find a
relevant issue.

Did anybody come across this ?

On a related note, I did this in order to convert a LINESTRINGZ to POINTZ
since the Extract Nodes tool did not preserve Z. CSV Exporting, text
editing and reimporting as MULTIPOINTZ seemed the easiest option. Is there
another option ?

Thanks, Andreas

-- 
Andreas Plesch
39 Barbara Rd.
Waltham, MA 02453
___
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] [processing] gdal warp -te confusion

2017-06-13 Thread Andreas Plesch
Responding to myself, for a complete record in the list archive.

I found that the warnings can be turned off in the Processing Options,
which corresponds to the
processing.core.ProcessingConfig.ProcessingConfig class

ProcessingConfig.getSetting(settingskey) returns the current value of the
setting, and
ProcessingConfig.setSettingValue(settingskey, value) modifies the setting.

This way a warning can be temporarily disabled and then restored.

Seems to work well,

-Andreas


On Sun, Jun 11, 2017 at 6:40 PM, Andreas Plesch 
wrote:

> I am using the gdal warp (reproject) processing algorithm in 2.18.9 with
> the 'Set georeferenced extents of output file' option, eg. the -te command
> line switch.
>
> I am warping from unprojected to UTM coordinates.
>
> Here is a correctly constructed console call
> gdalwarp -ot Float32 -t_srs EPSG:32611 -r near -of GTiff -te 222749.290374
> 3763741.53271 317609.171896 3877346.18124 -co COMPRESS=DEFLATE -co
> PREDICTOR=1 -co ZLEVEL=6 -wo OPTIMIZE_SIZE=TRUE C:\Users\andreas\Documents\
> x3d\n35w120\grdn35w120_clipped_600x700.tif "[temporary file]"
>
> (Sometimes the shown console command does not seem to get updated
> properly, but the executed command seems to be always correct)
>
> When I now 'Run' the algo, there is this warning:
>
> 'Extent parameters must use the same CRS as the input layers.
> Your input layers do not have the same extent as the project, so the
> extent might be in a wrong CRS if you have selected it from the canvas.'
>
> The project crs is the warp destination crs (UTM).
>
> The warning is misleading since gdalwarp by default will use the _target_
> crs:
> *-te* *xmin ymin xmax ymax*:set georeferenced extents of output file to
> be created (in target SRS by default, or in the SRS specified with -te_srs)
>
> Furthermore, the extent parameters can be in any srs if the -te_srs option
> is used.
>
> So to me the warning is quite irritating.
>
> Additionally, I am using the algorithm in a model where I know the inputs
> for the extents are correct. Is there a way to silence these wanrings in
> models ?
>
> THanks,
>
> Andreas
>
___
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] [processing] gdal warp -te confusion

2017-06-11 Thread Andreas Plesch
I am using the gdal warp (reproject) processing algorithm in 2.18.9 with
the 'Set georeferenced extents of output file' option, eg. the -te command
line switch.

I am warping from unprojected to UTM coordinates.

Here is a correctly constructed console call
gdalwarp -ot Float32 -t_srs EPSG:32611 -r near -of GTiff -te 222749.290374
3763741.53271 317609.171896 3877346.18124 -co COMPRESS=DEFLATE -co
PREDICTOR=1 -co ZLEVEL=6 -wo OPTIMIZE_SIZE=TRUE
C:\Users\andreas\Documents\x3d\n35w120\grdn35w120_clipped_600x700.tif
"[temporary file]"

(Sometimes the shown console command does not seem to get updated properly,
but the executed command seems to be always correct)

When I now 'Run' the algo, there is this warning:

'Extent parameters must use the same CRS as the input layers.
Your input layers do not have the same extent as the project, so the extent
might be in a wrong CRS if you have selected it from the canvas.'

The project crs is the warp destination crs (UTM).

The warning is misleading since gdalwarp by default will use the _target_
crs:
*-te* *xmin ymin xmax ymax*:set georeferenced extents of output file to be
created (in target SRS by default, or in the SRS specified with -te_srs)

Furthermore, the extent parameters can be in any srs if the -te_srs option
is used.

So to me the warning is quite irritating.

Additionally, I am using the algorithm in a model where I know the inputs
for the extents are correct. Is there a way to silence these wanrings in
models ?

THanks,

Andreas
___
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] styled vector to raster layer

2017-05-31 Thread Andreas Plesch
Hi Matthias,

well, while I could install qgis2compat, QFieldSync installation now
results in a broken plugin warning:

The plugin is broken. Python said:
cannot import name QtWidgets

I do have the PyQt5 QtWidgets module installed. However, I am not sure if
Qgis 2.18.3 can find it since it otherwise only uses PyQt4 ?  PyQt4 does
not seem to have a QtWidgets module. Is there perhaps an environmental
variable to set ? Anything I can check ?

-Andreas


On Wed, May 31, 2017 at 2:14 PM, Andreas Plesch 
wrote:

> Hi Matthias,
>
> sounds like exactly what I need. Unfortunately, QFieldSync depends on
> qgis2compat which in turn wants to use the QtTest PyQt module which
> apparently I do not have. Ah, my default PyQt4 was compiled and installed
> without QtTest, will just need to reinstall. Perhaps of interest that not
> all systems come with QtTest by default.
>
> I looked at https://github.com/opengisch/qfieldsync a bit, perhaps I can
> extract the relevant parts.
>
> Thanks, I would never have discovered this by myself,
>
> -Andreas
>
>
>
>
>
> On Wed, May 31, 2017 at 1:25 PM, Matthias Kuhn 
> wrote:
>
>> Hi Andreas,
>>
>> You can use the QFieldSync plugin which comes with a processing algorithm
>> that renders a styled map within a given extent to a raster dataset.
>>
>> Matthias
>>
>> On 5/31/17 6:29 PM, Andreas Plesch wrote:
>>
>> Responding to myself, I found this processing script in the script
>> repository:
>>
>> https://github.com/qgis/QGIS-Processing/blob/master/scripts/
>> Create_rasters_from_canvas_for_each_vector_layer_feature_extent.py
>>
>> It does almost what I had in mind. Its presence indicates that indeed
>> some Python scripting is necessary.
>>
>> I may give it a try. Unlike above, I would probably try to avoid using
>> the composer and just go for the straight maprenderer as in the map
>> rendering cookbook example: http://docs.qgis.org/
>> 2.18/en/docs/pyqgis_developer_cookbook/composer.html#simple-rendering
>>
>> I wonder if it will be necessary to clone the mapcanvas maprendercontext
>> to preserve current settings ?
>>
>> The main idea is to use the rasterized, styled vector layer as a
>> georeferenced image outside of QGis.
>>
>> -Andreas
>>
>> On Tue, May 30, 2017 at 2:19 PM, Andreas Plesch <
>> andreasple...@netscape.net> wrote:
>>
>>> I feel I am missing a basic function somewhere to "burn" (in gdal terms)
>>> a vector layer as styled by QGIS, for example with labels, to a raster
>>> layer (of some resolution).
>>>
>>> The Rasterize (vector to raster) function is based on gdal_rasterize and
>>> does not take into account styling as it focuses on preserving the actual
>>> data.
>>>
>>> The work around I am currently using is to use Project-Save as Image
>>> while displaying only the styled vector layer which will generate a correct
>>> world file helper, then loading the generated image as raster layer and
>>> assigning the correct projection. Finally, I clip the raster with the
>>> original extent of the vector layer.
>>>
>>> This works but is limited as the resolution is constrained by the
>>> physical size of the map window and requires the additional house keeping
>>> steps.
>>>
>>> qgis2web or QTiles or OGR2Tiles as plugins do something like this
>>> internally but I could not find a plugin which just generates a regular
>>> raster layer (say geotiff).
>>>
>>> I also know I could probably produce a short Python script (perhaps as
>>> processing script) to do this but still think I am missing something ?
>>>
>>> Any help or hint much welcome,
>>>
>>> Andreas
>>>
>>>
>>
>>
>> ___
>> 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
>>
>>
>>
>
___
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] styled vector to raster layer

2017-05-31 Thread Andreas Plesch
Hi Matthias,

sounds like exactly what I need. Unfortunately, QFieldSync depends on
qgis2compat which in turn wants to use the QtTest PyQt module which
apparently I do not have. Ah, my default PyQt4 was compiled and installed
without QtTest, will just need to reinstall. Perhaps of interest that not
all systems come with QtTest by default.

I looked at https://github.com/opengisch/qfieldsync a bit, perhaps I can
extract the relevant parts.

Thanks, I would never have discovered this by myself,

-Andreas





On Wed, May 31, 2017 at 1:25 PM, Matthias Kuhn  wrote:

> Hi Andreas,
>
> You can use the QFieldSync plugin which comes with a processing algorithm
> that renders a styled map within a given extent to a raster dataset.
>
> Matthias
>
> On 5/31/17 6:29 PM, Andreas Plesch wrote:
>
> Responding to myself, I found this processing script in the script
> repository:
>
> https://github.com/qgis/QGIS-Processing/blob/master/scripts/
> Create_rasters_from_canvas_for_each_vector_layer_feature_extent.py
>
> It does almost what I had in mind. Its presence indicates that indeed some
> Python scripting is necessary.
>
> I may give it a try. Unlike above, I would probably try to avoid using the
> composer and just go for the straight maprenderer as in the map rendering
> cookbook example: http://docs.qgis.org/2.18/en/docs/pyqgis_developer_
> cookbook/composer.html#simple-rendering
>
> I wonder if it will be necessary to clone the mapcanvas maprendercontext
> to preserve current settings ?
>
> The main idea is to use the rasterized, styled vector layer as a
> georeferenced image outside of QGis.
>
> -Andreas
>
> On Tue, May 30, 2017 at 2:19 PM, Andreas Plesch <
> andreasple...@netscape.net> wrote:
>
>> I feel I am missing a basic function somewhere to "burn" (in gdal terms)
>> a vector layer as styled by QGIS, for example with labels, to a raster
>> layer (of some resolution).
>>
>> The Rasterize (vector to raster) function is based on gdal_rasterize and
>> does not take into account styling as it focuses on preserving the actual
>> data.
>>
>> The work around I am currently using is to use Project-Save as Image
>> while displaying only the styled vector layer which will generate a correct
>> world file helper, then loading the generated image as raster layer and
>> assigning the correct projection. Finally, I clip the raster with the
>> original extent of the vector layer.
>>
>> This works but is limited as the resolution is constrained by the
>> physical size of the map window and requires the additional house keeping
>> steps.
>>
>> qgis2web or QTiles or OGR2Tiles as plugins do something like this
>> internally but I could not find a plugin which just generates a regular
>> raster layer (say geotiff).
>>
>> I also know I could probably produce a short Python script (perhaps as
>> processing script) to do this but still think I am missing something ?
>>
>> Any help or hint much welcome,
>>
>> Andreas
>>
>>
>
>
> ___
> 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
>
>
>
___
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] styled vector to raster layer

2017-05-31 Thread Andreas Plesch
Responding to myself, I found this processing script in the script
repository:

https://github.com/qgis/QGIS-Processing/blob/master/
scripts/Create_rasters_from_canvas_for_each_vector_layer_feature_extent.py

It does almost what I had in mind. Its presence indicates that indeed some
Python scripting is necessary.

I may give it a try. Unlike above, I would probably try to avoid using the
composer and just go for the straight maprenderer as in the map rendering
cookbook example:
http://docs.qgis.org/2.18/en/docs/pyqgis_developer_cookbook/composer.html#simple-rendering

I wonder if it will be necessary to clone the mapcanvas maprendercontext to
preserve current settings ?

The main idea is to use the rasterized, styled vector layer as a
georeferenced image outside of QGis.

-Andreas

On Tue, May 30, 2017 at 2:19 PM, Andreas Plesch 
wrote:

> I feel I am missing a basic function somewhere to "burn" (in gdal terms) a
> vector layer as styled by QGIS, for example with labels, to a raster layer
> (of some resolution).
>
> The Rasterize (vector to raster) function is based on gdal_rasterize and
> does not take into account styling as it focuses on preserving the actual
> data.
>
> The work around I am currently using is to use Project-Save as Image while
> displaying only the styled vector layer which will generate a correct world
> file helper, then loading the generated image as raster layer and assigning
> the correct projection. Finally, I clip the raster with the original extent
> of the vector layer.
>
> This works but is limited as the resolution is constrained by the physical
> size of the map window and requires the additional house keeping steps.
>
> qgis2web or QTiles or OGR2Tiles as plugins do something like this
> internally but I could not find a plugin which just generates a regular
> raster layer (say geotiff).
>
> I also know I could probably produce a short Python script (perhaps as
> processing script) to do this but still think I am missing something ?
>
> Any help or hint much welcome,
>
> Andreas
>
>
___
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] styled vector to raster layer

2017-05-30 Thread Andreas Plesch
I feel I am missing a basic function somewhere to "burn" (in gdal terms) a
vector layer as styled by QGIS, for example with labels, to a raster layer
(of some resolution).

The Rasterize (vector to raster) function is based on gdal_rasterize and
does not take into account styling as it focuses on preserving the actual
data.

The work around I am currently using is to use Project-Save as Image while
displaying only the styled vector layer which will generate a correct world
file helper, then loading the generated image as raster layer and assigning
the correct projection. Finally, I clip the raster with the original extent
of the vector layer.

This works but is limited as the resolution is constrained by the physical
size of the map window and requires the additional house keeping steps.

qgis2web or QTiles or OGR2Tiles as plugins do something like this
internally but I could not find a plugin which just generates a regular
raster layer (say geotiff).

I also know I could probably produce a short Python script (perhaps as
processing script) to do this but still think I am missing something ?

Any help or hint much welcome,

Andreas
___
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] [processing] connect selection input in model

2017-05-17 Thread Andreas Plesch
I have a selection input parameter in a processing script and would like to
use it in a model.

However, as far as I can see there is no way to connect the selection input
parameter to an output parameter of another script.

This is probably because there is no matching 'selected selection' output
type. Such a 'selected selection' output type could be either a string
matching one of selection options, or an integer index into the array of
selections.

Is there a recommended workaround ?

I may use a series of (pseudo) boolean input parameters instead as in:
x use Option A
x use Option B

Any thoughts or ideas very welcome,

-Andreas
___
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] Fwd: 2017 QGIS Grant Proposals final results

2017-05-01 Thread Andreas Plesch
> Date: Mon, 1 May 2017 01:03:17 +0200
> From: Tim Sutton 
> To: qgis-psc ,  QGIS Developer Mailing List
>
> Hi All
>
> Thanks for your patience while you waited for us to prepare the final
> results for the grant proposals. I hope it was worth the wait since we
> managed to make some more funds available to support more than the planned
> EUR 20,000 of proposals.  Read all about the successful proposals here:
>
> http://blog.qgis.org/2017/04/30/qgis-grant-programme-2-results/
>

As writer of proposal 12) ENHANCE INTEROPERABILITY BETWEEN QGIS AND X3D
(full details here:
https://qgisblog.files.wordpress.com/2017/04/qgisgrantapplicationssummary-
march2017.pdf, proposal 12)
, although unsuccessful, I would like to take the opportunity to thank the
QGIS Voting Membership and Sterring Committee for taking the time to read
through all proposal and cast votes. I recognize that having two 3d related
proposals made it difficult to support both at the same time with so many
other deserving projects also in the mix. Therefore, I do value the votes
in support of my proposal particularly. Thanks !

If you are curious, please head over to

https://github.com/andreasplesch/QGIS-X3D-Processing

to follow progress on this project. Any feedback, or contributions are much
appreciated.

Here is an example DEM export using the existing functionality:
https://rawgit.com/andreasplesch/QGIS-X3D-Processing/master/examples/
output/n35w120nedWGS84_200x200dir.html

Cheers, Andreas

-- 
Andreas Plesch
39 Barbara Rd.
Waltham, MA 02453
___
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] hillshade render style

2017-04-08 Thread Andreas Plesch
I could not find documentation on the hillshade render type style. While it
is rather self-explanatory, the multidirectional option could benefit from
explanation. I am looking at the source here:

http://qgis.org/api/2.18/qgshillshaderenderer_8cpp_source.html

and it points to

http://pubs.usgs.gov/of/1992/of92-422/of92-422.pdf

which uses a weighted average of hillshadings from four fixed directions.
The weight is squared sine of the difference between the aspect and each
illumination azimuth, emphasizing the darker slopes. The qgis code seems to
modify that a bit by making the four directions relative to the user
defined azimuth.

Is this a correct understanding ?

I am thinking about simulating this with webgl based (Phong) shading by
four directional lights.

-Andreas
___
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] [processing]: input selection type in modeler ?

2017-04-03 Thread Andreas Plesch
Processing python scripts can have a variety of parameter types including
selection:

http://docs.qgis.org/2.18/en/docs/user_manual/processing/scripts.html


   - selection. A dropdown menu that allows the user to select from a
   pre-populated list. For example units=selection sq_km;sq_miles;sq_degrees

If I want to use a script algorithm with such a selection input type in the
modeler, there does not seem to be a way to use a corresponding selection
input in the modeler (instead it is necessary to provide a fixed choice of
the available selections as a string).

Am I overlooking something ?

Thanks, Andreas
___
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-user Digest, Vol 133, Issue 60

2017-03-27 Thread Andreas Plesch
Hi Martin,

thanks for sharing. As it happens I submitted a (modest) grant proposal for
X3D Processing based development. I think the approaches are very
complementary and should not distract from each other.
Perhaps there are still opportunities to combine efforts in some way ?

Andreas




Date: Mon, 27 Mar 2017 17:21:11 +0800
From: Martin Dobias 
To: Paolo Cavallini 
Cc: qgis-user ,  qgis-developer

Subject: Re: [Qgis-user] [Qgis-developer]  QGIS X3D processing
Message-ID:

Content-Type: text/plain; charset=UTF-8

Hi Paolo

On Mon, Mar 27, 2017 at 2:15 PM, Paolo Cavallini 
wrote:
>>
>> What would be a good place to learn more about QGIS3 plans to use native
>> Qt5 3d facilities ?
>
> Hi Andreas,
> I do not know much. You can probably have a look to the work of Minoru
> Akagi, who started some early development on this.
> However, I think some core devs may be interested in joining the
discussion.

I have been playing with Qt 3D module recently and submitted a grant
proposal for native 3D support in QGIS. Here is my repo with a simple
3D rendering of a DEM with aerial imagery:

https://github.com/wonder-sk/qgis3d

Cheers
Martin



--
**
___
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 X3D processing

2017-03-26 Thread Andreas Plesch
Hi Paolo,


> Date: Sun, 26 Mar 2017 20:22:06 +0200
> From: Paolo Cavallini 
>
> Il 26/03/2017 00:27, Andreas Plesch ha scritto:
> > I would like to share a project for 3d visualization of Qgis content by
> ...
> > This effort is similar to QGIS2Threejs but is just starting out and will
> > use quite a different approach.
> >
> > Any comment, feedback or thought is welcome,
>
> Cool, thanks. AFAIK there are plans to use native Qt5 3D facilities,
> have you had a look to this too?
>

I looked into using qt webkit and found that qt5 webkit supports webgl (and
probably a modern js engine?). That would be very interesting as it would
be possible to rely just on webkit and perhaps have some tighter
integration with the Qgis gui.

What would be a good place to learn more about QGIS3 plans to use native
Qt5 3d facilities ?

-Andreas
___
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] QGIS X3D processing

2017-03-25 Thread Andreas Plesch
I would like to share a project for 3d visualization of Qgis content by
utilizing a not very well known ISO standard, the X3D geospatial component
as openly available in the x3dom implementation (http://x3dom.org). As a
first tangible result of this effort, it becomes possible to generate an
interactive 3d model of a DEM on a web page. Here is an example:

https://rawgit.com/andreasplesch/QGIS-X3D-Processing/master/examples/
output/n35w120nedWGS84_200x200.html

This page is directly generated from a DEM raster layer by running a new
processing model. The project uses exclusively the processing framework and
sofar consists of a number of foundational scripts and models. All code and
more examples are available on github:

https://github.com/andreasplesch/QGIS-X3D-Processing

Use the provided instruction if you feel adventurous
.
This effort is similar to QGIS2Threejs but is just starting out and will
use quite a different approach.

Any comment, feedback or thought is welcome,

Andreas
___
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] Color picker in Processing scripts

2017-03-19 Thread Andreas Plesch
I started an experiment to use Processing for exporting to 3d web pages
using x3dom (https://github.com/andreasplesch/QGIS-X3D-Processing) and was
wondering if there is some way to use a color button (
https://qgis.org/api/classQgsColorButton.html ) in a script. I know that
processing script algorithms only support the automatically constructed
input GUI elements but perhaps there is a way ?
Probably the proper way would be to have another input data type.
##surface_color=color green
but I am not familiar enough with the framework.
Thanks, Andreas
___
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] create script collection plugin -> broken, invalid plugin

2017-03-14 Thread Andreas Plesch
Using qgis 218.4, I am trying to use the processing script tool 'create
script collection plugin'. After putting the created plugin folder into the
user plugins/ folder, the created plugin shows up in the plugin manager.

However, it is listed in the Invalid category and the the plugin
description has a warning in red letters 'This plugin is broken' on orange
background. The only explanation is 'No module named
name_of_created_plugin_folder' .

This is easily reproducible by getting a script from the on-line script
collection, and just using it with the create script collection plugin tool
to generate a plugin. It will show up as invalid and broken.

Is there a requirement for the name of the created plugin folder ? What
else could I try ?

Thanks,

Andreas
___
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] processing script vs. processing plugin (Ari Jolma)

2017-03-13 Thread Andreas Plesch
This is very helpful. I will take a look at the Perl provider plugin to
understand better what its role is.

I think without the plugin it is still possible to construct a perl command
line, Popen it, and read back the output from within a regular python
processing script but much less convenient. Although it may be possible to
write a python package with commonly used functionality to make this
approach also convenient (import perlprocessing).

It looks there are quite​ a few other processing scripts on GitHub by
others which are not in QGIS-Processing. So it may make sense to have a
list decoupled from qgis but still curated depending on how responsively
QGIS-Processing is managed, eg. how PRs are accepted.

-Andreas

On Mar 13, 2017 8:38 AM, "Ari Jolma"  wrote:

> 13.03.2017, 13:24, Andreas Plesch kirjoitti:
>
> Hi Ari,
>
> thanks for your providing your perspective.
>
> A difference is that a plugin can provide multiple processing algorithms
> whereas a script only one.
>
> Another cosmetic difference is that a plugin can be managed and published
> with the plugin manager.
>
> Do you think you could have written your processing algorithms using Perl
> tools as a collection of processing scripts ?
>
>
> I think I have made that... In the sense that the plugin
>
> https://plugins.qgis.org/plugins/perlprocessing/
>
> (still the initial version which is not much more than a proof-of-concept)
>
> I wrote allows me to write processing algorithms as processing scripts. An
> example is this script
>
> https://github.com/ajolma/GDALToolsWithPerl/blob/master/dijkstra.pl
>
> which has a few comment lines in the beginning. Those make the script
> usable as a processing algorithm within QGIS. However, it can be used from
> the command line too.
>
>
> What is a good way of publishing, advertising and serving collections of
> processing scripts ?
>
>
> That depends on the provider. This repository
>
> https://github.com/qgis/QGIS-Processing
>
> is AFAIK used by the default (Python script) and R script provider.
>
>
> Gists ? GitHub repos and rawgit ?
>
> Is there a curated list of published scripts, like an awesome qgis repo ?
>
>
> The above one. Or maybe you're referring to that one?
>
> If there's interest for Perl scripts I guess we could work out something.
>
> Ari
>
>
> Andreas
>
>
> Message: 7
> Date: Mon, 13 Mar 2017 09:24:17 +0200
> From: Ari Jolma 
> To: qgis-user@lists.osgeo.org
> Subject: Re: [Qgis-user] processing script vs. processing plugin
> Message-ID: <8950e763-af35-1135-9b5d-43c57bcd3...@gmail.com>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
> To me it seems that processing algorithm provider plugins are language
> or tool specific plugins that add a new section to the processing.
> Processing is itself a plugin (although a core one).
>
> I don't think providers should add custom GUIs beyond what is needed to
> manage itself and the algorithms it provides. That is, its GUI is for
> adding, possibly creating, etc. algorithms. It should mostly work
> through the processing plugin.
>
> The "algorithms" are processing tools (scripts, external programs, etc)
> that only have a thin wrapper so that the provider plugin can help the
> processing plugin create a GUI for running it or linking it to other
> tools to create models.
>
> This is my understanding that I've gained by creating a provider plugin
> for Perl programs to be used as processing algorithms.
>
> I'm actually a bit against listing the providers separately since the
> user should not need to care what language or program the processing
> tool is written as long as it does what the user wants.
>
> Best regards,
>
> Ari
>
>
> 13.03.2017, 04:48, Andreas Plesch kirjoitti:
> > What are differences between processing algorithms provided as a
> > processing script or as processing algorithm provider plugin ?
> >
> > A plugin can presumably have its own custom GUI but are there are
> > other differences in available capabilities ?
> >
> > Andreas
>
>
>
___
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] processing script vs. processing plugin

2017-03-12 Thread Andreas Plesch
What are differences between processing algorithms provided as a processing
script or as processing algorithm provider plugin ?

A plugin can presumably have its own custom GUI but are there are other
differences in available capabilities ?

Andreas
___
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] Launching simpleHTTPServer from processing script or plugin

2017-03-12 Thread Andreas Plesch
I am starting to work on a processing script which has a html file as
output. The html file has js scripts which require it to be served from a
web server (httpd). The regular webkit viewer is not quite capable enough
but I can launch the system web browser using the webbrowser python package
from the script. However, I cannot figure out how to launch a
SimpleHTTPServer in a separate thread from the script. When I start a httpd
server from the script using the server_forever method the server is
launched but Qgis freezes. When I try to use threading following
 https://docs.python.org/2/library/socketserver.html#asynchronous-mixinsqgis
crashes. Would using a ThreadedTCPServer be the right approach ?

Any tips, examples, or thoughts much welcome. Should I subscribe and post
to qgis-developer ?

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