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 *@ *[email protected]
*D *6313 6849 *W *www.lifa.dk
*M *2492 4866
*Fra:*Richard McDonnell [mailto:[email protected]]
*Sendt:* 30. juni 2017 12:39
*Til:* Lars I. Nielsen, LIFA A/S; '[email protected]'
*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 *@ *[email protected] <mailto:[email protected]>
*D *6313 6849 *W *www.lifa.dk <http://www.lifa.dk>
*M *2492 4866
_______________________________________________
Qgis-user mailing list
[email protected] <mailto:[email protected]>
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/>
--
*_Richard McDonnell_*
*GIS Specialist PgD GIS AssocSCSI*
*OPW FRM Data Management*
*52 Stephens Green, Dublin 2.*
TEL: 01 6476543
OPW - Ag féachaint don am atá le teacht - Ag caomhnú ón am atá thart
OPW - Looking to the future - Caring for the past
***********************************************************
Email Disclaimer: http://www.opw.ie/en/disclaimer/
_______________________________________________
Qgis-user mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user