diff --git a/docs/db/layers.md b/docs/db/layers.md index a193008..054ced6 100644 --- a/docs/db/layers.md +++ b/docs/db/layers.md @@ -83,8 +83,8 @@ Common additional parameters you may want to use include: #### Other options -- `projection` - If the projection is anything other than EPSG:3857, set it here. For WMS based layers, this is enough. For XYZ layers, see the section on [XYZ reprojection](#xyz-reprojection) -- `cswendpoint` - An endpoint to retrieve a CSW Metadata document, describing the layer. The metadata document should use Dublin Core and will be available via the 'i' button next to the layer name in the layer control. +- `projection` - If the layer is only available in a projection that is not the same as the map you are putting it in to, set the projection here, otherwise you can not include it, and the layer will be requested in the projection of the map. For XYZ layers, see the section on [XYZ reprojection](#xyz-reprojection) +- `cswendpoint` - An endpoint to retrieve a CSW Metadata document, describing the layer. The metadata document should use Dublin Core and will be available via the 'i' button next to the layer name in the layer control. ### Layer diff --git a/docs/db/projections.md b/docs/db/projections.md new file mode 100644 index 0000000..aa53da3 --- /dev/null +++ b/docs/db/projections.md @@ -0,0 +1,28 @@ +# Projections + +GIFramework Maps can use multiple projections for both the actual map rendering and the display coordinates. The Projections table defines what projections are available to the application. + +## Relevant tables + +| Table Name | Description | +| --------------------------------- | ------------------------------------ | +| Projections | The projection definitions | +| VersionProjections | Table that defines which versions have which projections | + +### Projections + +This table contains the projection definition. + +- `EPSGCode` - The EPSG code of the projection. +- `Name` - The name of the projection +- `Description` - A description of what this projection is and where it covers +- `Proj4Definition` - A Proj4 or WKT definition of the projection +- `MinBoundX` - The bottom left X coordinate of this projections maximum bounds, in Lat/Lon +- `MinBoundY` - The bottom left Y coordinate of this projections maximum bounds, in Lat/Lon +- `MaxBoundX` - The top right X coordinate of this projections maximum bounds, in Lat/Lon +- `MaxBoundY` - The top right Y coordinate of this projections maximum bounds, in Lat/Lon +- `DefaultRenderedDecimalPlaces` - The number of decimal places shown by default when showing coordinates in this projection + +### VersionProjections + +See [VersionProjections](../db/versions.md#versionprojection) diff --git a/docs/db/versions.md b/docs/db/versions.md index d3a7568..2bc903f 100644 --- a/docs/db/versions.md +++ b/docs/db/versions.md @@ -15,6 +15,7 @@ The `Versions` table contains all the basic information about a version of GIFra | VersionContact | Lists the users that should be contacted regarding a version | | VersionLayer | Contains per-layer customisations applied to a version | | VersionPrintConfiguration | Identifies which print configuration a version uses | +| VersionProjections | Lists the projections available to a version and what the defaults are | | VersionSearchDefinition | Lists the search definitions that are enabled in a version and their default settings | | VersionUser | Contains the users that have access to a version | @@ -98,6 +99,15 @@ The `VersionPrintConfiguration` table defines which print configurations are use !!! note If a specific configuration is not set for a version, it will fall back to that defined for the 'general' version +### VersionProjection + +The `VersionProjection` table defines which projection the map renders in and what projections are available for viewing. + +- `VersionId` - The `Id` from the `Versions` table +- `ProjectionId` - The `Id` from the `Projections` table +- `IsDefaultMapProjection` - Whether this projection is the one used for map rendering +- `IsDefaultViewProjection` - Whether this projection is the default one set as the display coordinates + ### VersionSearchDefinition The `VersionSearchDefinition` table defines which searches are available in which versions. diff --git a/docs/gui/layers.md b/docs/gui/layers.md index 327d0f0..4316a75 100644 --- a/docs/gui/layers.md +++ b/docs/gui/layers.md @@ -26,16 +26,20 @@ You will be taken to a page to check and update the details if necessary. Most o - Description - a basic description of the layer. This is shown to end users when the layer has no other description metadata available from source. This is automatically taken from the Abstract of the WMS layer if available - Layer type - choose the type. This will default to TileWMS, indicating you want the layer to be tiled. This is normally the right option, but you can also choose ImageWMS for untiled. Check the [help documentation on Layer types](../db/layers.md#layersourcetype) for more information - Attribution - the [attribution](../gui/attributions.md) you want your layer to use. If the service provided an attribution string, the system will attempt to find the best match in your list of attributions and pre-select it. This can generate false positives, and often services do not provide an attribution string, so you'll need to check this and set it yourself. +- Projection - The projection of the data you will be requesting. If you selected 'auto' on the previous screen, this will be blank. If its blank, the layer will automatically request data in the projection of the map its within. See [Auto Projection](#auto-projection) below for more information. There is a collapsible section for 'Advanced settings'. You should generally leave this alone as it contains details that will be used behind the scenes to make your layer work. However, you can edit them if you need to. - Base URL - This should be set to the 'base' url of the WMS service. This is normally provided to you by the service, and will look something like `https:///wms` - Layer Name - This is the name of the layer in the web service, not the name that users will see. This name will be used by OpenLayers to make appropriate requests to the service. - Format - The image format that will be used. This was available to select from the previous screen, so if you want something different, you should go back and select from the list. -- Projection - The projection of the data you will be requesting. This was available to select from the previous screen, so if you want something different, you should go back and select from the list. - Version - The WMS version you will be using. This will generally be 1.1.0 or 1.3.0 and will have been selected for you, but you can override it here if you know what you are doing. - Require use of proxy? - Indicates whether this layer source requires the proxy. Will have been pre-selected for you based on your choices on the previous screen. +#### Auto Projection + +GIFramework Maps will automatically request data in the projection of the map it is within unless you specifically set a projection. Auto projection is ideal in most cases where the server the data is coming from is able to handle the projections you want. However, if the server hosting the source data does not handle the projection of the map, you will need to explicity set the projection on the layer source. GIFramework Maps will then handle the reprojection required to display it properly. If you aren't sure, set the projection to one advertised by the server as compatible. + ### Add a layer from an XYZ/TMS template You can enter an XYZ/TMS URL template to create a layer. @@ -168,7 +172,7 @@ You can also apply custom formatting by passing a `format` string to the `date` !!! example "Examples" Assuming an attribute called `DATE_ATTRIBUTE` with the value `2023-02-07T17:10:00.000Z` (Feb 7th, 2023 at 17:10) - - `{{DATE_ATTRIBUTE | date}}` :material-arrow-right: `07/02/2023` + - `{{DATE_ATTRIBUTE | date}}` :material-arrow-right: `07/02/2023` (assuming `en-GB` locale, will be different depending on users locale) - `{{DATE_ATTRIBUTE | date('yyyy')}}` :material-arrow-right: `2023` - `{{DATE_ATTRIBUTE | date('ccc dd LLLL yyyy T')}}` :material-arrow-right: `Tuesday 07 February 2023 17:10` diff --git a/docs/gui/system.md b/docs/gui/system.md index 3de9dfa..1028ebc 100644 --- a/docs/gui/system.md +++ b/docs/gui/system.md @@ -75,4 +75,50 @@ Select the tool you wish to edit from the tool list by product name. Make the ch ### Delete an analytics tool -Select the **Remove** link on the right of the tool list. This will remove your analytics entry. \ No newline at end of file +Select the **Remove** link on the right of the tool list. This will remove your analytics entry. + +## Projections + +GIFramework Maps can use multiple projections for both the actual map rendering and the display coordinates. The Projections section lets you manage what projections are available. + +### Register new projection + +To add a new projection to the list of available projections, choose 'Register new projection'. See [Getting projection details](#getting-projection-details) below to find out how to get the information you need. + +- `EPSG Code` - The EPSG code of the projection +- `Name` - The name of the projection +- `Description` - A description of what this projection is and where it covers +- `Proj4 or WKT Definition` - A Proj4 or WKT definition of the projection +- `Bottom Left X (Min X)` - The bottom left X coordinate of this projections maximum bounds, in Lat/Lon +- `Bottom Left Y (Min Y)` - The bottom left Y coordinate of this projections maximum bounds, in Lat/Lon +- `Top Right X (Max X)` - The top right X coordinate of this projections maximum bounds, in Lat/Lon +- `Top Right Y (Max Y)` - The top right Y coordinate of this projections maximum bounds, in Lat/Lon +- `Default display decimal places` - The number of decimal places shown by default when showing coordinates in this projection + +### Edit a projection + +Select the projection you want to edit from the list. Make the changes you want and hit Save. + +!!! warning + Be careful editing projections, as these can have a dramatic effect on the application + +### Delete a projection + +Select the projection you want to delete from the list. At the bottom, hit Delete and confirm your choice. + +!!! danger + Make sure your projection is not being used anywhere before deleting it + +### Getting projection details + +Projections are defined using the EPSG Code, Proj4Definition and bounds. You can get these using websites such as https://epsg.io or https://epsg.org/. You can use a Proj4 or WKT style definition for the projection definition. You do not have to provide a definition for the [built-in projections](#built-in-projections). + +### Built-in projections + +The following projections are built-in, and do not require a Proj4 or WKT definition. + +- EPSG:3857 - Spherical Mercator +- EPSG:4326 - WGS84 Lat/Lon +- EPSG:4269 - NAD83 (North America) + +You will still need to add the projection to the list to make it available to the application. \ No newline at end of file diff --git a/docs/gui/versions.md b/docs/gui/versions.md index 7a22cba..d63ba08 100644 --- a/docs/gui/versions.md +++ b/docs/gui/versions.md @@ -25,7 +25,8 @@ Select **Create new version** and fill in the details: On the right side of the screen, you'll see options for: - Basemaps - choose which basemaps you want to include in your version and which one you want to set as the default -- Categories - choose which layer categories you want to include in your version +- [Projections](../gui/system.md#projections) - choose which projections are available and what the default map and viewing projection is +- [Categories](../gui/layers.md#layer-categories) - choose which layer categories you want to include in your version ## Edit a version diff --git a/mkdocs.yml b/mkdocs.yml index cff32ed..8d36c2b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -76,6 +76,7 @@ nav: - 'Categories': 'db/categories.md' - 'Layers': 'db/layers.md' - 'Print Configuration': 'db/print-config.md' + - 'Projections': 'db/projections.md' - 'Proxying': 'db/proxy.md' - 'Search Definitions': 'db/search-definitions.md' - 'Theming': 'db/theming.md'