OGR provider - Disappearing features and “Invalid index : -1”

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

OGR provider - Disappearing features and “Invalid index : -1”

Jonathan Jensen
Hey, I have recently noticed a strange behavior on one of our MapGuide 3.1.0
setups, where features from some layers would disappear from time to time
when panning or zooming.
I have narrowed it down to only being layers using the OGR provider and it
happens in both MapInfo tab files and in Esri shapefiles.
The error happens when previewing a layer or a feature source, or when doing
a GETMAPIMAGE operation to the mapagent.fcgi
Video of the error on a completely fresh MapGuide 3.1.1 installation:
https://youtu.be/OPU_6WinG3U 

I have been able to reproduce the error in MapGuide 3.1.0 and 3.1.1 and on
multiple computers and servers running Windows Server 2012 R2 and Windows 10
Pro

The error acts like an invalid spatial index, however deleting/rebuilding
the shx files does nothing to correct it. Tab files also have the error with
or without any indexes.
It also happens on newly created layers from both MapInfo and QGIS, and
reference system does not seem to matter as it happens with both EPSG:25832
and EPSG:4326

I have three different test files, along with a text containing ogrinfo
output and output from MapGuide.
Test files along with output can be downloaded here:
https://geograf.com/filer/misc/mapguide_ogr_test.zip 

The primary output is from MapGuide running with cpl_debug=on
Previewing the data source causes this:
“ERROR 1: Invalid index : -1”

Selecting features sometimes causes this:
“(10408) An exception occurred in FDO component.
Error occurred in Feature Source
(Session:39c9d69c-3f46-11e9-8000-005056c00001_en_MTI3LjAuMC4x0AFC0AFB0AFA//FeatureSourcePreview86a7364a-cc48-43f9-a004-043296a06f8c.FeatureSource):
Invalid index : -1 (Cause: , Root Cause: Invalid index : -1)”

MapGuide 3.1.1 providers.xml
  <FeatureProvider>
    <Name>OSGeo.OGR.4.1</Name>
    <DisplayName>OGR Provider</DisplayName>
    <Description>FDO Access to OGR Data Sources</Description>
    <IsManaged>False</IsManaged>
    <Version>4.1.0.0</Version>
    <FeatureDataObjectsVersion>4.1.0.0</FeatureDataObjectsVersion>
    <LibraryPath>.\OGRProvider.dll</LibraryPath>
  </FeatureProvider>

I have been unable to find any mentions of this problem, this a known bug
with a workaround or something new?

-Jonathan



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: OGR provider - Disappearing features and “Invalid index : -1”

Jackie Ng
Hi Jonathan,

I'll take a look at this to see what I can find out (on the MapGuide/FDO
end), but the fact that this happens in QGIS as well *strongly* suggests
that the problem is at the OGR driver level and not of the consuming client
applications like FDO/QGIS, so perhaps you could continue your line of
enquiry with the GDAL/OGR devs.

- Jackie



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: OGR provider - Disappearing features and “Invalid index : -1”

Jonathan Jensen
Hi Jackie, I have only been able to reproduce it in MapGuide.
I just did the test with newly created files/layers from both MapInfo and
QGIS, to rule out that it was because of bad or corrupted files.
So far, I have been unable to reproduce the problem in QGIS itself.

-Jonathan




--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: OGR provider - Disappearing features and “Invalid index : -1”

Jackie Ng
Sorry for my poor comprehension. I misread your original post. I'll see what
I can dig up.

- Jackie



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: OGR provider - Disappearing features and “Invalid index : -1”

Jackie Ng
In reply to this post by Jonathan Jensen
An update.

With a build of MapGuide that is close to the soon-to-be-released-i-promise
3.1.2, I can't reproduce this disappearing features effect or the "Invalid
index: -1" error.

The major giveaway when I was trying to reproduce this is that when I was
previewing the various data files you have supplied through the feature
source preview, my "MapGuide Debugging Information" actually shows the total
number of features instead of "-1" as indicated in the video you posted.

The OGR provider has undergone many quality-of-life improvements since the
version that shipped with the 3.1.1 release. This might have been one of the
issues fixed in the process.

I guess wait until 3.1.2 is released and see if your issue persists.

- Jackie



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: OGR provider - Disappearing features and “Invalid index : -1”

Jonathan Jensen
Hey Jackie

Thanks for looking into it.
I think the solution for us right now is to set up a few nightly jobs to
convert our tab files to shapefiles, and then use the shp provider which
works in 3.1.1.
I'll keep an eye out for 3.1.2 and then update once it gets released.

-Jonathan



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: OGR provider - Disappearing features and “Invalid index : -1”

Martin Morrison
If you are already converting the data, why not look at SQL Server or another true database?  Much faster and more scalable.

Martin Morrison     
Infrastructure Application Engineer/Systems Analyst
 Engineering Design Systems, Inc.
540.345.1410
[hidden email]


-----Original Message-----
From: mapguide-users <[hidden email]> On Behalf Of Jonathan Jensen
Sent: Wednesday, March 13, 2019 4:43 AM
To: [hidden email]
Subject: Re: [mapguide-users] OGR provider - Disappearing features and “Invalid index : -1”

Hey Jackie

Thanks for looking into it.
I think the solution for us right now is to set up a few nightly jobs to convert our tab files to shapefiles, and then use the shp provider which works in 3.1.1.
I'll keep an eye out for 3.1.2 and then update once it gets released.

-Jonathan



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: OGR provider - Disappearing features and “Invalid index : -1”

Jonathan Jensen
Hey Martin

It's a good point and I have already moved our own layers into SQL Server.
The remaining is running on one of our customers server, with a bunch of old
jobs that dump tab files from different third party systems every night, so
my first instinct was to quickly set up an OGR2OGR job to convert them to
shp files.
Though thinking about it, I could just as easily use OGR2OGR to upload the
tab files to a SQL server instead of bothering with the shapefiles.
Thanks for the idea!

-Jonathan



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: OGR provider - Disappearing features and “Invalid index : -1”

Jonathan Jensen
Hey just a quick update.

I have been unable to reproduce the problem in the new MapGuide version
3.1.2, so updating to the new version has fixed it. :)

-Jonathan



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: OGR provider - Disappearing features and “Invalid index : -1”

Jackie Ng
Excellent. That's great news!

- Jackie



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users