Aerial Images & Pipelines (old import method)
Aerial images and pipelines still use the old importer, so you'll need to follow a different import procedure.
Aerial Images
The aerial images script can be used to import aerial images.
CSV Format
The following headers must be present in the CSV file, and they cannot be blank:
| Header | Type | Blank | Help |
|---|---|---|---|
| Aerial image | String | NO | Each file referenced in this column must exist in the --data_path folder |
| Owner | String | NO | Company with the given name must exist in the platform |
| Taken at | Date | NO | ISO format |
Note: Any additional fields will be stored as extra data object.
Script Arguments
This script does not accept any parameters beyond the commonly required ones (environment, api_key, data_path).
Example
Example of calling the aerial_images import script on prod:
python -m importers.infrastructure.aerial_images --environment prod --api_key {API_KEY_VALUE} --data_path {PATH_TO_FOLDER}Pipelines
The pipelines import script can be used to import pipeline infrastructure data.
Data Format
Unlike the other scripts, the pipelines script requires a GeoJSON file present in the data import folder. No other files are required.
As the script is invoked, the GeoJSON file will be converted to a CSV file for compatibility with other data import scripts.
Important: No other CSV files can be in the data import folder.
GeoJSON Fields
The following fields must be present in the GeoJSON file, and they cannot be blank:
| Header | Type | Blank | Help | Extra |
|---|---|---|---|---|
| Line Id | String or Number | NO | Used to group in maps and is important to capture for each operator | |
| Segment Id | String or Number | NO | ||
| Geometry | LineString or MultiLineString | NO | ||
| Material | String | YES | ||
| Diameter | String | YES | ||
| Status | String | NO | ||
| Miles | Number | YES |
Notes:
- Any additional fields will be stored as extra data object.
- If present,
pipe_mat_1will be used as pipeline segment material andnominal_diwill be used as segment diameter. If not present, the values will be set to "Other".
Script Arguments
This script requires an operator name under the --owner argument, plus the commonly required ones (environment, api_key, data_path).
Example
Example of calling the pipelines import script on prod:
python -m importers.infrastructure.pipelines --environment prod --api_key {API_KEY_VALUE} --data_path {PATH_TO_FOLDER} --owner {OWNER_NAME}