kibana/docs/maps/import-geospatial-data.asciidoc
Nathan Reese f4efe1b70b
[Maps] layer work flow usability (#154102)
All this dashboard usability work as sparked some ideas to make better
work flows in Maps

### Adding layer
Enhance "Add layer" work flow by allowing users to exit wizard after
layer is added instead of forcing users to continue wizard even if they
do not have any additional configuration changes to make.

Old
<img width="300" alt="Screen Shot 2023-03-30 at 2 56 56 PM"
src="https://user-images.githubusercontent.com/373691/228962788-397e77fe-81b5-438a-a45c-3210101be336.png">


New
<img width="300" alt="Screen Shot 2023-03-30 at 2 22 44 PM"
src="https://user-images.githubusercontent.com/373691/228962403-ed18f8dc-c518-473d-8dd1-f889f7e51684.png">

### Editing layer
"Save" language in layer editor is poor choice since layer changes are
not persisted until user clicks "Save" button in top chrome to save
entire map. Updated copy to better reflect action.

Old
<img width="300" alt="Screen Shot 2023-03-30 at 2 57 16 PM"
src="https://user-images.githubusercontent.com/373691/228962822-d923978f-71c4-4c7f-96f9-b003ededfbbe.png">


New
<img width="300" alt="Screen Shot 2023-03-30 at 2 49 57 PM"
src="https://user-images.githubusercontent.com/373691/228962420-4bd9d554-97ae-4c37-b677-84cd762e3f39.png">

### Other changes
"Map settings" => "Settings"

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-04 11:48:21 -06:00

126 lines
4.9 KiB
Text

[role="xpack"]
[[import-geospatial-data]]
== Import geospatial data
To import geospatical data into the Elastic Stack, the data must be indexed as {ref}/geo-point.html[geo_point] or {ref}/geo-shape.html[geo_shape].
Geospatial data comes in many formats.
Choose an import tool based on the format of your geospatial data.
[discrete]
[[import-geospatial-privileges]]
=== Security privileges
The {stack-security-features} provide roles and privileges that control which users can upload files.
You can manage your roles, privileges, and
spaces in **{stack-manage-app}** in {kib}. For more information, see
{ref}/security-privileges.html[Security privileges],
<<kibana-privileges, {kib} privileges>>, and <<kibana-role-management, {kib} role management>>.
To upload GeoJSON files, shapefiles, and draw features in {kib} with *Maps*, you must have:
* The `all` {kib} privilege for *Maps*
* The `all` {kib} privilege for *{ipm-app}*
* The `create` and `create_index` index privileges for destination indices
* To use the index in *Maps*, you must also have the `read` and `view_index_metadata` index privileges for destination indices
To upload delimited files (such as CSV, TSV, or JSON files) on the {kib} home page, you must also have:
* The `all` {kib} privilege for *Discover*
* The `manage_pipeline` or `manage_ingest_pipelines` cluster privilege
* The `manage` index privilege for destination indices
[discrete]
=== Upload delimited files with latitude and longitude columns
On the {kib} home page, you can upload a file and import it into an {es} index with latitude and longitude columns combined into a `geo_point` field.
. Go to the {kib} home page and click *Upload a file*.
. Select a file in one of the supported file formats.
. Click *Import*.
. Select the *Advanced* tab.
. Set *Index name*.
. If a combined `geo_point` field is not created automatically, click *Add combined field*, then click *Add geo point field*.
. Fill out the form and click *Add*.
. Click *Import*.
[discrete]
=== Upload a GeoJSON file
*Upload file* indexes GeoJSON features in {es}, creating a document for each feature.
NOTE: GeoJSON feature coordinates must be in EPSG:4326 coordinate reference system..
. <<maps-create, Create a new map>>.
. Click *Add layer*.
. Select *Upload file*.
. Use the file chooser to select a GeoJSON file with the extension `.json` or `.geojson`.
. Click *Import file*.
[discrete]
=== Upload a shapefile
*Upload file* indexes shapefile features in {es}, creating a document for each feature.
. <<maps-create, Create a new map>>.
. Click *Add layer*.
. Select *Upload file*.
. Use the file chooser to select the `.shp` file from your shapefile folder.
. Use the `.dbf` file chooser to select the `.dbf` file from your shapefile folder.
. Use the `.prj` file chooser to select the `.prj` file from your shapefile folder.
. Use the `.shx` file chooser to select the `.shx` file from your shapefile folder.
. Click *Import file*.
[discrete]
=== Draw features in a map
Upload features into {es} by drawing lines, polygons, circles, bounding boxes, and points in a map.
To create a new index for drawing:
. <<maps-create, Create a map>>.
. Click *Add layer*.
. Select *Create index*.
. Set *Index name*.
. Click *Create index*.
To open an existing index for drawing:
. <<maps-create, Create a map>>.
. Click *Add layer*.
. Select *Documents*.
. Select the data view that points to your index. A <<data-views, data view>> can point to one or more indices. For feature editing, the data view must point to a single index.
. Click *Add and close*.
. In the legend, click the layer name and select *Edit features*.
When feature editing is open, a feature editing toolbox is displayed on the left side of the map.
[role="screenshot"]
image::maps/images/drawing_layer.png[]
To draw features:
. Click on the line, polygon, circle, bounding box, or point icon.
. Move the mouse cursor over the map and follow the on screen instructions to draw a feature.
+
When a feature is complete, the feature is added to the index as a new document.
. Repeat to draw additional features.
. When you are finished adding features, go to the legend, and click *Exit* under the layer name.
[discrete]
=== Upload data with IP addresses
The GeoIP processor adds information about the geographical location of IP addresses.
See {ref}/geoip-processor.html[GeoIP processor] for details.
For private IP addresses, see https://www.elastic.co/blog/enriching-elasticsearch-data-geo-ips-internal-private-ip-addresses[Enriching data with GeoIPs from internal, private IP addresses].
[discrete]
=== Upload data with GDAL
https://www.gdal.org/[GDAL] (Geospatial Data Abstraction Library) contains command line tools that can convert geospatial data between 75 different geospatial file formats and index that geospatial data into {es}.
See https://www.elastic.co/blog/how-to-ingest-geospatial-data-into-elasticsearch-with-gdal[Ingest geospatial data into Elasticsearch with GDAL] for details.