[Qgis-user] Visibility of items in SQL Database

Luke coolhandluka at gmail.com
Tue Jun 8 17:31:37 PDT 2021


Hey Johanna

Some things to check

1. Your records have a srid recorded that aligns with the srid recorded for
the dataset. You can check this by querying in SQL Server with query
"select <geom_col>.STSrid from <table>". Compare this with what you have
recorded in the geometry_columns table for the table. They should match
otherwise they are filtered when connecting to the dataset.
2. Check the geometry types are also the same as what is being recorded in
geometry_columns table.  "select <geom_col>.STGeometryType() from <table>".
This is often the case for us and usually is a issue with geometry
collections particularly if you use tools like FME to fix geometry as it
tends to mangle things further.
3. Check geometry validity within SQL Server. I think that QGIS filters out
invalid geometry in some cases so you won't detect it in qgis if they are
filtered. I am not 100% sure this happens with newer versions of QGIS but I
have seen it in the past. "select <geom_col>.IsValidDetailed() from <table>
where <geom_col>.STIsValid() = 0"

Hope that helps
Luke

On Wed, Jun 9, 2021 at 8:20 AM Johanna Botman <johannab at melton.vic.gov.au>
wrote:

> Thanks Bo Victor for that suggestion, but that is not the problem.
> I should have mentioned that I had already tried changing the symbology.
>
>
> Johanna Botman
>
> Assets / GIS Officer - Melton City Council
>
>
>
> Hi Johanna -
>
> I suspect, you have some symbology issues with the layer/table from DB1
>
> Try to change the symbology from "whatever it is now" to a "Single symbol"
> for the DB1 layer and check if your missing objects appear
>
> Med venlig hilsen / Kind regards
>
> Bo Victor Thomsen
>
> Den 08-06-2021 kl. 08:39 skrev Johanna Botman:
> >
> > Hi,
> >
> > I have a situation where I have two SQL databases and I have to move
> > data from one to the other. Always the same direction from DB1 to DB2
> >
> > My issue is that the items show in some tables in DB1 but do not
> > display in QGIS.
> > I can select from the table, but I can?t select items on the QGIS
> > canvas
> > I can cut and paste from DB1 to DB2 and the items display in DB2.
> > I can manually create an item in an affected table in DB1 and it will
> > display.
> > When I hover with my Add [polygon/line/point] tool, the square to show
> > where the vertices (for snapping) are displayed as I move my cursor
> > over them.
> > When I run the Validate Geometry tool, the results are that I have
> > valid geometry and those layers are displayed.
> > In SQL server manager I can see the spatial results for those tables
> > in DB1.
> > Projections are the same for each DB
> > There are no Layer Scale Visibility settings in play for either DB
> > It does not affect all tables in DB1.
> >
> > Can anyone suggest some further troubleshooting strategies?
> > *Johanna Botman*
> >
> > Assets / GIS Officer ? Melton City Council
>
>
> ***********************************************************************************
> The information in this message is privileged and confidential, intended
> only for the use of the individual or entity named above. If you are not
> the intended recipient you are hereby notified to delete the message and
> that any dissemination, copying or use of its content is strictly
> prohibited. If you have received this message in error please notify the
> Melton City Council.
>
> ***********************************************************************************
> _______________________________________________
> Qgis-user mailing list
> 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
>


-- 

*Luke Bassett*
* <lukembassett at gmail.com>*Melbourne Australia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210609/c3ab44af/attachment.html>


More information about the Qgis-user mailing list