Shapefiles (.shp)
Shapefiles are a format introduced by ESRI for the storage of geodata, which has developed into a quasi-standard for the exchange of digital geographical information. In contrast to LTG files, which contain area, line and point information, a shape file describes only one separate layer (e.g. only the boundaries of postal code areas). However, a shapefile does not consist of a single file, but of a bundle of files that are needed for the corresponding use. In addition to a SHP file for storing geometry information, this includes SHX or DBF files in which index information for the geometry or attribute data is stored.
Inserting Shapefiles into easymap
Shapefiles can be inserted directly from the control window Base Maps onto the map sheet. If the shapefiles to be edited are not stored in the standard path of the digital maps, the corresponding directory must be selected.
All shapefiles in the selected directory are listed in the control window Map Basics under "Maps in SHP format". To insert all shapefiles in the specified directory on the map sheet, click on the heading above the individual shapefiles and drag them with the mouse from the Map Basics control window onto the map sheet (Drag&Drop). The heading above the individual shapefiles corresponds to the name of the folder containing the shapefiles (here GK3). To insert a single layer (e.g. e-streets_-_main net), select it with a mouse click and then drag and drop it from the Map Basics control window onto the map sheet. As soon as one or more Shapefiles have been dragged onto the map sheet, the Select Key Columns window opens.
Selection of key column
In contrast to the LTG format cards included in the scope of delivery, whose key column is predefined, Shapefiles can contain several columns with different identification numbers or IDs. From these numbers and IDs, a so-called key column must be selected, which is to be used for linking the base map and attribute data. This column must have the property that it contains only unique values. Columns with empty cells or number columns with decimal places are also not valid key columns.
Each object of a shapefile always contains at least one column with the name "FID" in the corresponding table (DBF file). The abbreviation FID stands for Feature Identifier and represents a unique identification number for each object of a shapefile. However, the FID is usually a consecutive number with which the individual objects are numbered consecutively, so that the FID can only be considered as an emergency solution if no other column fulfills the conditions for a key column. For example, analyses should only be based on the data supplied from the shape file if FID is used as the lead column.
After a corresponding key column has been defined for all shapefiles, the individual shapefiles are displayed in the map sheet and in control window Content . By default only the geometries (areas, lines and points) are visible. The corresponding texts are not displayed at first, but can be made visible later by checking the corresponding box in the control window Content checkbox.
Further topics:
easymap has to build a index file (*.qix) in order to use shapefiles. If the user has write permissions in the directory where the Shapefile comes from, the created QIX-file is stored in this directory. The next time the same Shapefile is used, it is reused, which leads to significantly faster processing times. If the QIX file cannot be saved, it must be recreated each time the Shapefile is used, which can lead to longer insertion times, especially with large Shapefiles. If there are no write permissions available and the shapefiles are used frequently, it is advisable to move the files or to use them once under a user account in easymap, which has write permissions here (e.g. administrator)
Note: Please keep in mind that the QIX files are not automatically regenerated if, for example, changes have been made to the SHP file. So it may happen that an SHP file is not displayed although it is correctly assembled. In such a case, delete the existing QIX file and recreate the file with easymap.
In the basic version, the SHP format does not provide any information about the coordinate system in which the stored coordinates are stored. For this there are additional projection files (PRJ) in which this information can be stored. These are optional, but many functions are not available if the projection file is missing. A projection file has the same name as the shape file, but the extension *.prj.
Base maps can only be displayed together in a map if they use the same or a very similar coordinate system. This cannot be determined without a projection file and is therefore not possible in these cases. In addition, no conversions into length specifications can be performed.
Note: Always make sure that you also have projection files for the shapefiles used. Otherwise, the functionality is very limited.
Unfortunately, there is no uniform standard for character encoding for shapefiles. This cannot even be determined from the files by the program.
If you use a Shapefile and the texts are incorrect (e.g. German umlauts are displayed incorrectly, or even whole texts consist only of cryptic characters), easymap could not determine the character encoding of the Shapefile. easymap uses by default the ANSI character set with the codepage currently set in the system for reading Shapefiles.
To define the character encoding for a shape file, ESRI has introduced another additional file, the Codepage File (CPG) . This is a text file with the same name as the Shape file, but with the extension *.CPG. The only text that must be entered in this file is the number of the code page in which the shape file was encoded.
The following code pages are frequently used:
- 850: Western European (DOS)
- 1252: Western European (Windows)
- 1200: Unicode
- 65001: Unicode (UTF8)
Especially for Eastern European countries the following code pages are used more often:
- 1250: Central European (Windows)
- 1251: Cyrillic (Windows)
- 1253: Greek (Windows)
- 1254: Turkish (Windows)
Specifying the Character Encoding for a Shapefile
easymap supports you in creating a codepage file for an existing shapefile, if it is missing and characters are displayed incorrectly. Open the context menu of a shapefile in the control window base maps with the right mouse button and select Set Codepage for File "...". You can define a character encoding in the following dialog box. After finishing this process easymap creates a CPG file. To do this, you must have write permission in the folder in which the shapefile is located. If this is not the case, please contact your administrator.