Shapefile
Esri Shapefiles can be imported into Studio. The Shapefile format contains a table with one geometry column providing a geometry (point, line or polygon) per row and a number of data columns.
| Loader | Characteristic |
|---|---|
| File Format | Esri Shapefile |
| File Type | Multi-file, binary |
| File Extension | .shp, .dbf, .prj, .cpg |
| MIME type | application/octet-stream |
Shapefile is a multi file format, and each shapefile is stored in multiple files (with the same basename but different extensions
stations.shp,stations.dbfetc. All the files related to one shapefile need to be provided / be accessible when opening the file.
- When loading Shapefile from your local computer, all files representing a Shapefile should be provided at the same time, e.g. by selecting multiple files in the Studio file selection dialog, or by collecting the required files in a zip file.
- When loading a shapefile from a URL, the Studio platform expects all the component files of a Shapefile to be located in the same folder and have the same base name with different file extensions:
Shapefile files
| File Type | Description | Comment |
|---|---|---|
.shp | Geometries (geometry column) | Required |
.dbf | Data (all other columns in the table) | Required |
.prj | Specifies Coordinate Reference System for the .shp file | Optional |
.cpg | Encoding format for strings in the .dbf file | Optional |
.shx | Index file (typically not needed) | Optional |
- Normally there is always a
<filename>.shpand a<filename>.dbffile pair, containing geometry and data, respectively. - Studio will also use
<filename>.prj,<filename>.cpgand<filename>.shxfiles if provided. - Other Shapefile file extensions are ignored by the Studio Platform and need not be supplied.
Note that the Shapefile format defines additional "sidecar" file types. These are optional files (per the Shapefile specification) that are less commonly used, and are ignored by the Studio Platform.
Coordinate Systems
Arbitrary coordinate reference systems are supported for Shapefiles. Such coordinate systems are reprojected to WGS84 on import. Studio leverages a selection of the best available reprojection libraries and provides extensive support for different coordinate reference systems.
Troubleshooting
- No data columns: If only the
.shpfile was opened, only the geometry is included, - Incorrect strings: Encodings may not be correct without the
.cpgfile. - Geometry projection issues: geometry may fail to load or be visualized incorrectly without the associated
.prjfile.
Also note that there is a very large number of possible projections and it is hard to test that every possible projection is supported. If your data is old or known to be problematic, it may be worth double checking that things look correct after importing.
Updated almost 2 years ago
