1

I am completely new to GIS and I had hopefully a simple question regarding how to reduce the file size of my shapefile and associated database file. The files sizes are:

  • Shapefile (.shp file format) is 50 mb
  • Database (.dbf file format) is 50 mb

The attribute table information I have is:

  • 12 fields
  • length averaging 10-20 with precision averaging 0-1
  • In total there is 417960 lines in the attribute table for each one of the 12 fields

With my data I also have a .prj file and .shx file. I have been trying to use QGIS 2.18.13 with GRASS 7.2.1 to convert the files into KML and also to change into NTD83 for use in IHS Accumap.

When I try to import the files into Google Earth the error message states there is over 2500 layers and even when viewing in restricted view it slows and crashes Google Earth. And IHS Accumap is very slow as well.

3
  • 1
    100mb is no more than medium size for a shapefile (your's is 1/40th of maximum). Depending on the dBase field types, KML could be a hundred times larger. Specifying the number of features (and vertices per feature) as well as the actual dBase field definition might provide more clarity on your options.
    – Vince
    Oct 6, 2017 at 13:49
  • Thanks for the prompt response. As I mentioned still very new to this. There is 417960 features. I tired using the vertices counter plugin for QGIS but it wouldn't even load. I am trying to find a script that will provide the vertices count at the moment.
    – ipark
    Oct 6, 2017 at 14:29
  • Also my apologies what do you mean by dBase file definition?
    – ipark
    Oct 6, 2017 at 14:37

1 Answer 1

1

It could be something in your system set up or the steps you are following to convert shp to kml. I converted a 152mb of all USA counties shapefile with QGIS and loaded in Google Earth without any problems. My shapefile has about 3200 features (each of these show up as a layer in Google Earth).

enter image description here

Maybe the number of features is the issue, since my file has a smaller number - but probably not the overall size of your file. Can you try to convert a small subset of the features in your shapefile and see if you are able to get to the result you are after?

In case you are going about in a different way, I create the kml file by right clicking on the layer in QGIS and do a saveas

3
  • In order to make a smaller subset of the features, is the best approach to saveas a .CSV and then revert that smaller file back to either a .shp or .dbf? or can it be done through attribute table manipulation right in QGIS?
    – ipark
    Oct 6, 2017 at 15:15
  • If you have your shp file loaded in QGIS, you can do a window selection in QGIS of a subset of features and save to as another shapefile (use only selected features option) and use the new and smaller shapefile to convert to kml.
    – ZrSiO4
    Oct 6, 2017 at 15:31
  • Sorry for the delayed response that worked very well for me in google earth. Still seemed sluggish in Accumap, but I think I will try to export out of Accumap and just work in QGIS.
    – ipark
    Oct 6, 2017 at 18:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.