guireference.rst 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. .. _extensions_importer_guireference:
  2. Importer interface reference
  3. ============================
  4. The Layer Importer user interface is a component of the GeoServer web interface. You can access it from the GeoServer web interface by clicking the :guilabel:`Import Data` link, found on the left side of the screen after logging in.
  5. Data sources page
  6. -----------------
  7. The front page of the Layer Importer is where the data source and format are set. The following options are displayed:
  8. Choose a data source to import from
  9. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  10. Select one of the following data sources to use for the import:
  11. * :guilabel:`Spatial Files` (see :ref:`extensions_importer_formats` for more details)
  12. * :guilabel:`PostGIS` database
  13. * :guilabel:`Oracle` database
  14. * :guilabel:`SQL Server` database
  15. .. figure:: images/sources_choosesourcefiles.png
  16. Choose a data source
  17. The contents of the next section is dependent on the data source chosen here.
  18. Configure the data source: Spatial Files
  19. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  20. There is a single box for selecting a file or directory. Click the :guilabel:`Browse` link to bring up a file chooser. To select a file, click on it. To select a directory, click on a directory name to open it and then click :guilabel:`OK`.
  21. .. figure:: images/sources_spatialfiles.png
  22. Spatial file data source
  23. .. figure:: images/sources_filechooser.png
  24. File chooser for selecting spatial files
  25. Configure the data source: PostGIS
  26. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  27. Fill out fields for :guilabel:`Connection type` (Default or JNDI) :guilabel:`Host`, :guilabel:`Port`, :guilabel:`Database` name, :guilabel:`Schema`, :guilabel:`Username` to connect with, and :guilabel:`Password`.
  28. There are also advanced connection options, which are common to the standard PostGIS store loading procedure. (See the :ref:`PostGIS data store <data_postgis>` page in the GeoServer reference documentation.)
  29. .. figure:: images/sources_postgis.png
  30. PostGIS data source connection
  31. Configure the data source: Oracle
  32. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  33. The parameter fields for the Oracle import are identical to that of PostGIS. The fields aren't populated with default credentials with the exception of the port, which is set to **1521** by default.
  34. .. note:: This option is only enabled if the :ref:`Oracle <data_oracle>` extension is installed.
  35. .. figure:: images/sources_oracle.png
  36. Oracle data source connection
  37. Configure the data source: SQL Server
  38. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  39. The parameter fields for the SQL Server import are identical to that of PostGIS. The fields aren't populated with default credentials with the exception of the port, which is set to **4866** by default.
  40. .. note:: This option is only enabled if the :ref:`SQL Server <data_sqlserver>` extension is installed.
  41. .. figure:: images/sources_sqlserver.png
  42. SQL Server data source connection
  43. Specify the target for the import
  44. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  45. This area specifies where in the GeoServer catalog the new data source will be stored. This does not affect file placement.
  46. Select the name of an existing workspace and store.
  47. .. figure:: images/sources_target.png
  48. Target workspace and store in GeoServer
  49. Alternately, select :guilabel:`Create New` and type in a names for a new workspace or store. During the import process, these will be created.
  50. .. figure:: images/sources_newworkspace.png
  51. Creating a new workspace and store
  52. Recent imports
  53. ~~~~~~~~~~~~~~
  54. This section will list previous imports, and whether they were successful or not. Items can be removed from this list with the :guilabel:`Remove` button, but otherwise cannot be edited.
  55. .. figure:: images/sources_recentimports.png
  56. Recent imports
  57. When ready to continue to the next page, click :guilabel:`Next`.
  58. Layer listing page
  59. ------------------
  60. On the next page will be a list of layers found by the Layer Importer. The layers will be named according to the source content's name (file name of database table name). For each entry there will be a :guilabel:`Status` showing if the source is ready to be imported.
  61. All layers will be selected for import by default, but can be deselected here by unchecking the box next to each entry.
  62. .. figure:: images/layerlist_select.png
  63. List of layers to be imported
  64. A common issue during the import process is when a CRS cannot be determined for a given layer. In this case, a dialog box will display where the CRS can be declared explicitly. Enter the CRS and Click :guilabel:`Apply`.
  65. .. figure:: images/layerlist_crs.png
  66. Declaring a CRS
  67. When ready to perform the import, click :guilabel:`Import`.
  68. Each selected layer will be added to the GeoServer catalog inside a new or existing store, and published as a layer.
  69. After the import is complete the status area will refresh showing if the import was successful for each layer. If successful, a dialog box for previewing the layer will be displayed, with options for :guilabel:`Layer Preview` (OpenLayers), :guilabel:`Google Earth`, and :guilabel:`GeoExplorer`.
  70. .. figure:: images/layerlist_success.png
  71. Layers successfully imported
  72. Advanced import settings page
  73. -----------------------------
  74. The :guilabel:`Advanced` link next to each layer will lead to the Advanced import settings page.
  75. On this page, data can be set to be reprojected from one CRS to another during the import process. To enable reprojection, select the :guilabel:`Reprojection` box, and enter the source and target CRS.
  76. In addition, on this page attributes can be renamed and their type changed. Click on the :guilabel:`Add` link under :guilabel:`Attribute Remapping` to select the attribute to alter, its type, and its new name. Click :guilabel:`Apply` when done.
  77. Click :guilabel:`Save` when finished.
  78. .. figure:: images/advanced.png
  79. Advanced layer list page