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

Lars I. Nielsen, LIFA A/S lin at LIFA.DK
Tue Jul 4 06:54:08 PDT 2017


Hi Richard,

Yes, I’ve come to much the same conclusion: dummy features of the correct topology is the easiest way to force QGIS.

I tried to publish the geometry_column table via WFS, as this contains the topology designations, and have QGIS load that via WFS.

But it seems that this logic unfortunately isn’t a general thing in QGIS, only a specifically database thing.

I’ll go with the dummy features for now.


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: 4. juli 2017 11:38
Til: Lars I. Nielsen, LIFA A/S
Cc: 'qgis-user at lists.osgeo.org'
Emne: Re: SV: [Qgis-user] Unknown topology of empty WFS layer ?

Hi again,
Having the constraint in does appear, when loading tables directly into QGIS, to help QGIS in defining what kind of Geometry the table has. I don't believe that it will help you much in relation to the WFS though.
Might I suggest you add  a "Place Holder" to your dataset, as in a Temporary Line (polygon or point), at the far extents of your dataset for example 0,0 to 10,0 or something like that, that will give you a feature from which , when the WFS is loaded, QGIS can see that it is a certain geometry.
I am sorry I cant be of more help.
Regards,

Richard.
On 04/07/2017 08:33, Lars I. Nielsen, LIFA A/S wrote:
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<mailto:lin at lifa.dk>
D  6313 6849    W  www.lifa.dk<http://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<mailto: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/>

--
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/a3324ea4/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/a3324ea4/attachment.gif>


More information about the Qgis-user mailing list