Shapefile

Load Shapefile

A shapefile stores non-topological geometry and attribute information for the spatial features in a data set. The geometry for a feature is stored as a shape comprising a set of vector coordinates. Additional files represent the attributes, coordinate system information, metadata, etc. To load a shapefile point to the *.shp file. Global Mapper supports loading Shapefiles directly from .tar.gz files, so you do not need to uncompress your Shapefile data if you do not want to.

If the shapefile contains a metadata *.shp.xml, this information can be viewed with Metadata in an Additional tab.

Export Shapefile

The Export Shapefile command allows the user to export any loaded vector data sets to ESRI Shapefile format files.

When selected, the command displays the Shapefile Export Options dialog (pictured below) which allows the user to set up the export. The dialog consists of a File Selection, an Attribute Setup, Tiling, and an Export Bounds tabs which allows the user to set up the portion of the loaded vector data they wish to export.

  The Export Areas, Export Lines, and Export Points options enable area, line, and point export respectively. Pressing the Select... button next to each of those options allows you to select the name of the SHP file to generate.

In addition to the SHP file containing the actual geometry of the features, an shape index file (SHX) and attribute database file (DBF) will be created as well with the same name as the SHP file.

The Attribute Options allow for additional control over when and how attributes are exported to the shapefile. Select Character Set for Text supports the display of text in a character set other than the current system character set. When this is checked the text from a DBF file is not converted from the character set stored in the DBF file to the system active character set, but is kept native.  

In general, Global Mapper will automatically determine an appropriate field type and length for any attributes exported to the DBF file created along with a Shapefile based on the values of the attribute data being exported. However, if your input data includes Shapefiles or DBF files, the original field type and length for an attribute will be used unless the attribute values being exported make that impossible.

The Split Export Based On option splits up the export into separate files based on the feature type/classification, feature description, feature name, or any attribute found in the loaded data.

Choose the Split on Feature Type option, to get the export split based on the feature classification, except in the case of the unknown types, in which case the feature description will be used automatically. The type/description/name/attribute value of the features stored in each file will be appended on to the end of the selected filenames.

The Discard Attributes When All Values are Empty option will discard any attributes on export if all values for the attribute in the features being exported to the file are blank

If selected, the Generate Projection (PRJ) File option causes a projection file describing the ground reference system of the shapefile to be generated for each shapefile created. The PRJ files will have the same name as the SHP file with the .prj extension.

If selected, the Add Feature Type (LAYER) Attribute to DBF option specifies that the type description for each exported feature will be added as a LAYER attribute to the DBF file generated with the SHP file.

If selected, the Add Style Attributes to DBF option specifies that style attributes should be added to the generated DBF file containing information about the drawing style and label font used for each feature. If you check this then when you reload your data in Global Mapper (but typically not other applications) it should maintain its drawing style.

If selected, the Generate 3D Features Using Loaded Elevation Data option specifies that 3D objects should be created in the shapefile. The elevation stored for each vertex/point will be the first of the following which is available:

  • The elevation associated with the vertex/point in question.
  • The elevation associated with the entire feature being exported. For example, the elevation of a contour line.
  • The first elevation obtained by searching the loaded elevation grid layers at the position of the vertex/point.
  • A value of 0.0 will be used if no elevation could be obtained via any of the prior methods.

If selected, the Generate Multi-Patch Features for Areas option specifies that multi-patch features should be generated for area exports rather than normal polygon records. This is useful for exporting 3D models, such as those you would load from Google SketchUp SKP files.

If selected, the Save Feature Elevations as Measures option specifies that Measure features (i.e. PolyLineM, PointM) should be created. The per-vertex elevations will be stored as the Measure values. Typically you might use this if your per-vertex elevations are actually something like shotpoint numbers and not really elevations.

Use Generate Side Areas for Extruded 3D Areas to generate a 3D area feature with the extrusion mode. When exporting a 3D Shapefile with this checked.  additional areas for the sides and bottom of the 3D area are created, similar to a 3D box for a building.

The Attribute Setup tab will contain a list of the default Attributes that will be exported to the dataset, and contain the following information on the Attributes in a grid:

  • Name - the name of the attribute as stored in Global Mapper
  • Export Name - the name of the attribute as it will appear in the exported file
  • Type - the data type for the attribute
  • Length - the length of the data
  • Precision - number of digits right of the decimal for floating point data

The contents of the Type, Length, and Precision columns can be changed by clicking on the grid cell. The Name and Export Name columns are read-only.

When the user clicks on a cell in the Type column, a drop-down list containing the supported data types will be displayed.  The user can select one of the types from the list.

When the user clicks on a cell in the Length or Precision column, the column can be edited in place, allowing the user to type a new value directly into the cell.  If the user types a lower value into the Length or Precision column, GM will display a warning indicating that that action may cause a loss of data. A Precision value can only be entered if the Type is 'Float'.

The tab also contains a button that will remove the selected column(s) from the export.

Note that the grid contains all of the attributes on the layers that are available for export.  If the user chooses to export a subset of the data (e.g.,  only area features), then only the attributes associated with the designated features will be exported.  Any changes made in the grid will be applied when the attributes are exported.

WARNING: The Shapefile format uses a DBF file for attribute storage, which means that any attribute names are limited to 10 characters. Any attribute names longer than that will be truncated with a number potentially added on to maintain uniqueness among multiple long attribute names.

Format Updates

Below is a summary of recent changes to shapefile format support:

20.1 Show any metadata .xml files found alongside loaded layers in the Additional tab of the Metadata dialog for the layer, such as .shp.xml files for Shapefiles.[Item #25849]
20.1 Significant speed improvements loading and working with workspaces, GMP files, and any vector data with attributes (especially Shapefiles).[Item #23912]
20.0 Dramatic speed improvements for the load time of many vector formats such as shapefiles[Item #23912]
20.0 Added support for multi-patch shapes of triangle list type for Shapefiles and ESRI File Geodatabases. Also mark all areas that were created from a single multi-patch as being in the same area group.[Item #23063]
20.0 Make sure ELEVATION attribute is displayed in Attribute Editor for PointZ Shapefiles.[Item #23665]
18.2 Added option to automatically reformat Shapefile (DBF) numeric attribute values using scientific notation as normal decimal numbers. This option is on the General->Vector Formats tab of the Configuration dialog. [Item #20593]
18.2 Greatly sped up the export of Lidar point cloud data to Shapefiles. [Item #20253]
18.2 Fixed shapefile import so that the file can be loaded even though the .dbf file is missing. [Item #19317]
18.2 Added option to automatically reformat Shapefile (DBF) numeric attribute values using scientific notation as normal decimal numbers
18.1 Significantly sped up display and other operations on vector data sets. This includes significantly faster load of large Shapefiles.
17.2 Added information about grouped (multi-part) areas in Metadata dialog for layer. If grouped areas are present (either loaded from a Shapefile or grouped in Global Mapper), the AREA COUNT field includes group information and a new AREA GROUPS field shows detailed information. [Item #17616]
17.1 Updated addition of style attributes when exporting to Shapefile to update existing 10-character Shapefile style attributes rather than creating duplicates for style attributes over 10-characters if style attributes had previously been added. [Item #17003]
16.2 Updated export of Lidar point clouds to vector formats, like Shapefiles, to not include the Lidar class name in the CLASS attribute. Where before you would get a CLASS value of ‘2 (Ground)’, you will now just get ‘2’. This allows for simpler searches and editing and smaller files.
16.1 Added “Add ELEVATION Attribute” option to batch conversion to Shapefiles.
16.0 Made date fields in DBF/Shapefiles be formatted using the current system local date settings rather than always MM/DD/YYYY.
16.0 Added option to Shapefile export to include the sides and bottom of extruded 3D areas as additional 3D area features in the export.
15.2 Greatly sped up handling of Shapefiles with large numbers of attributes, both for initial display and search.
15.2 Added option to Shapefile export to allow selecting the code page/language to export. All exported attributes and other text will be converted from the specified language for the layer to the selected output language. If you export to UTF-8 a .cpg file is also created with the export specifying that the text is encoded with UTF-8.
15.2 Added support for providing CODE_PAGE parameter to EXPORT_VECTOR for Shapefile export to get exported results in difference code pages (languages).
15.1 Added Attribute Setup tab to Shapefile export to allow customizing exported attribute types and lengths.
15.0 Updated Shapefile export to replace degree characters with spaces since some versions of Arc can’t handle degree symbols in DBF files.
15.0 Added ALLOW_COMMA_DECIMAL parameter to EXPORT_VECTOR command for Shapefiles to control whether or not a comma can be treated as a decimal when detecting floating point fields.
15.0 Improved handling of non-English text in Shapefiles/DBF. Text will automatically be converted based on the language specified in the DBF file. Support for UTF-8 decoding specified in a .cpg file along with the .shp file is also supported.
15.0 Added option to Shapefile export to allow discarding any attributes for which all values are empty.
15.0 Added option to Shapefile export to control whether or not ELEVATION attributes are written out for features with a single elevation value.
15.0 Added option to Shapefile export to control whether or not a comma can be used for a decimal when detecting the type of fields.
14.2 Sped up display of Shapefile export options dialog when large map catalogs of vector data are loaded.
14.2 Added options to group multiple polygons into a single multi-part polygon and also to un-group polygons. These options are under the Advanced Feature Creation submenu. All areas in a multi-part group must be in the same layer and have the same attributes, style, and type. Editing any area in a group will edit all areas in the group. These areas will stay grouped as a multi-part polygon when exporting to Shapefiles. You can select all areas that are part of a group under the Advanced Selections submenu. You can also see all of the areas in a group with the Feature Info tool.
14.2 Allowed batch converting Lidar point clouds to Shapefiles.
14.2 Updated batch convert to Shapefile to use lower-case extension for all generated files rather than upper case.