Select to view content in your preferred language

Shapefile support in 100.2

837
6
04-24-2018 09:14 AM
DavidSopsick
Emerging Contributor

I am attempting to load a world map as a shapefile for users that are disconnected for the network. While I can do it, I have noticed it is extremely slow to render. If the map has to refresh due to a move or zoom, the CPU jumps up for 20 seconds or so before the map finally displays. Maps loaded over the network are loading significantly faster than a shapefile stored on my local hard drive. Is there something that can be done to optimize the performance of rendering a vector map? Right now I am loading it as a feature layer.

Tags (1)
0 Kudos
6 Replies
LucasDanzinger
Esri Frequent Contributor

David-

Are you running in Debug? If so, do you see a difference in Release? If not, can you share your shapefile & code?

-Luke

0 Kudos
DavidSopsick
Emerging Contributor

Thanks for the reply. Yes I was running in debug, silly mistake. Release brings it down to about a 3-4 second reload which is tolerable but is much slower than the ESRI MapObjects code we are replacing. It would redraw this shapefile in under a second. I am basically using the code in the link below except the map is created without a basemap parameter since the application will not have access to ArcGIS online.

Feature layer (Shapefile)—ArcGIS Runtime SDK for Qt | ArcGIS for Developers 

0 Kudos
LucasDanzinger
Esri Frequent Contributor

Do you find that the sample itself takes 3-4 seconds? That one loads quite quickly for me. I'm wondering if I'll need some different test data to reproduce the issue?

0 Kudos
DavidSopsick
Emerging Contributor

No I am using a file similar to the old cntry98.shp file that used to ship with MapObjects, except the one I have has about 6 times the resolution. Its a 33MB shapefile. Unfortunately, it is on an isolated network so I have no good way to pass it to you.

0 Kudos
LucasDanzinger
Esri Frequent Contributor

Hi David,

If you are able to share any scrubbed data at all that you can reproduce poor performance with, I'd really appreciate it. I tested with some shapefiles of Alaska and California Counties, that were between 50-100 mb, and they loaded up pretty quick. 

I'd also be interested to know if the ShapefileFeatureTable or FeatureLayer actually loads quickly but the rendering is slow? You can connect to the doneLoading signal and use QDateTime to get an idea of how long the load cycle takes. Loading just means it is ready to use, but does not mean it is rendering. This could help narrow down if the issue is on the rendering side or the data side of our code base.

-Luke

0 Kudos
DavidSopsick
Emerging Contributor

Luke

Thanks. I am working on getting the data transferred. How should I pass it to you?

Dave

0 Kudos