[Qgis-user] Unknown topology of empty WFS layer ?

Lars I. Nielsen, LIFA A/S lin at LIFA.DK
Tue Jul 4 00:33:47 PDT 2017


Hi Richard,

Thanks for the reply.

I failed to mention, that I’m using MS/SQL 2016 as my database, but I should be able to add geometry constraint in it.

But then again, I want to tell QGIS that it’s a line layer, and I’m uncertain whether such proposed database constraints will do that, Postgres or not ?

Is there not any way to tell/force QGIS to recognize/designate a WFS layer with no features to be of a certain topology (here: lines) ?


Med venlig hilsen

Lars I. Nielsen, LIFA A/S
GIS-konsulent

LIFA A/S Landinspektører

T  6313 6800    @  lin at lifa.dk
D  6313 6849    W  www.lifa.dk
M  2492 4866


Fra: Richard McDonnell [mailto:richard.mcdonnell at opw.ie]
Sendt: 30. juni 2017 12:39
Til: Lars I. Nielsen, LIFA A/S; 'qgis-user at lists.osgeo.org'
Emne: Re: [Qgis-user] Unknown topology of empty WFS layer ?

Hi,
Not sure if this is exactly what you are looking for.
Your Layers, Ive no idea what database type you are using, but on PostgreSQL/PostGIS you can put in geometry Constraints using

ALTER TABLE public."Table_Name"

and one of the following, depending on what Geometry type you are looking at.

ADD CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geom) = 'MULTIPOLYGON'::text OR geom IS NULL);

ADD CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geom) = 'POLYGON'::text OR geom IS NULL);

ADD CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geom) = 'POINT'::text OR geom IS NULL);

ADD CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geom) = 'LINESTRING'::text OR geom IS NULL);

I hope this helps
Reagrds,

Richard
On 30/06/2017 10:39, Lars I. Nielsen, LIFA A/S wrote:
Hi,

I’m preparing a QGIS project for a customer, and have (among other) three layers with points, lines, and areas respectively.

I’m adapting the project from a previously made project by altering the data connections. The databases are identical in structure, so it works. The layers are all fetched using WFS-T.

So far I only have data in the points and areas layers, none in the lines layer. The lines dataset (table) in the database is present, and published as WFS (Geoserver), and all metadata (afaik) is present (i.e. “geometry_columns”).

I would like to be able to digitize lines into the line layer, but apparently QGIS cannot determine the topology, and (I suppose that’s also why) I can’t add any styles via the “properties” dialog or elsewhere.

Is there any way, that I can tell QGIS that the layer should contain line features ?

And how can I add suitable (line) styles to display the lines without any features present ?

Using 2.18.7 (32+64) Windows


Med venlig hilsen

Lars I. Nielsen, LIFA A/S
GIS-konsulent


[http://website.lifa.dk/lsp.gif]


T  6313 6800    @  lin at lifa.dk<mailto:lin at lifa.dk>
D  6313 6849    W  www.lifa.dk<http://www.lifa.dk>
M  2492 4866




_______________________________________________

Qgis-user mailing list

Qgis-user at lists.osgeo.org<mailto:Qgis-user at lists.osgeo.org>

List info: https://lists.osgeo.org/mailman/listinfo/qgis-user

Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

--
Richard McDonnell
GIS Specialist PgD GIS AssocSCSI
OPW FRM Data Management
52 Stephens Green, Dublin 2.
TEL: 01 6476543
[http://www.opw.ie/en/media/opw-logo-december-2016.gif]<http://www.opw.ie/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20170704/0873753f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 4785 bytes
Desc: image001.gif
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20170704/0873753f/attachment.gif>


More information about the Qgis-user mailing list