### Run Latest Stable ldproxy Docker Image Source: https://github.com/interactive-instruments/ldproxy/blob/master/README.md Installs and starts the latest stable ldproxy version using Docker. Ensure Docker is installed and running. This command maps port 7080 and creates a volume for data persistence. ```bash docker run -d -p 7080:7080 -v ldproxy_data:/ldproxy/data iide/ldproxy:latest ``` -------------------------------- ### Run LDProxy Locally with Gradle Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Execute the Gradle wrapper to run LDProxy locally. It will start on port 7080 by default. ```bash ./gradlew run ``` -------------------------------- ### Example Docker ps output Source: https://github.com/interactive-instruments/ldproxy/blob/master/src/markdown/docs/en/application/30-deployment.md Sample output from the 'docker ps' command, showing a running ldproxy container with its ID, image, command, status, ports, and name. ```text CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 62db022d9bee iide/ldproxy:latest "/ldproxy/bin/ldproxy" 16 minutes ago Up 16 minutes 0.0.0.0:7080->7080/tcp ldproxy ``` -------------------------------- ### Get Features as HTML Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Retrieves features from the 'vineyards' collection and requests the response in HTML format. ```bash curl "https://demo.ldproxy.net/vineyards/collections/vineyards/items?f=html" ``` -------------------------------- ### Start ldproxy with Docker Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Deploys ldproxy using Docker with persistent data storage. Use `docker logs -f ldproxy` to check logs and `docker restart ldproxy` after configuration changes. ```bash # Start ldproxy with Docker docker run -d -p 7080:7080 -v ldproxy_data:/ldproxy/data iide/ldproxy:latest # Check logs docker logs -f ldproxy # Restart after configuration changes docker restart ldproxy ``` -------------------------------- ### Create and Configure PostgreSQL Database Source: https://github.com/interactive-instruments/ldproxy/blob/master/demo/vineyards/README.md Commands to drop, create, and add the PostGIS extension to a PostgreSQL database named 'vineyards'. Ensure database credentials match your local setup. ```bash dropdb -Upostgres -W -hlocalhost -p5432 vineyards createdb -Upostgres -W -hlocalhost -p5432 vineyards psql -Upostgres -W -hlocalhost -p5432 -dvineyards -c "create extension postgis;" ``` -------------------------------- ### Get TILES Tileset Metadata Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Retrieves metadata for the available tilesets. ```bash curl "https://demo.ldproxy.net/vineyards/tiles" ``` -------------------------------- ### Create ldproxy Distribution Archive Source: https://github.com/interactive-instruments/ldproxy/blob/master/README.md Generate distribution archives (tar or zip) for ldproxy using Gradle. These archives can be used to start ldproxy on any machine with Java 11. ```bash ./gradlew distTar ``` ```bash ./gradlew distZip ``` -------------------------------- ### Get OGC API Features Landing Page Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Retrieves the landing page for the OGC API Features service. ```bash curl "https://demo.ldproxy.net/vineyards" ``` -------------------------------- ### Get Features as GeoJSON Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Retrieves features from the 'vineyards' collection in GeoJSON format (default). ```bash curl "https://demo.ldproxy.net/vineyards/collections/vineyards/items" ``` -------------------------------- ### Get Style Metadata with curl Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Retrieve metadata associated with a specific style using curl. ```bash # Get style metadata curl "https://demo.ldproxy.net/vineyards/styles/default/metadata" ``` -------------------------------- ### Get OpenAPI Document as YAML with curl Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Retrieve the OpenAPI 3.0 documentation for the API in YAML format using curl. ```bash # Get OpenAPI document as YAML curl "https://demo.ldproxy.net/vineyards/api?f=yaml" ``` -------------------------------- ### Get TILES TileJSON Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Retrieves the TileJSON metadata for a specific tileset, which describes how to access the tiles. ```bash curl "https://demo.ldproxy.net/vineyards/tiles/WebMercatorQuad?f=tilejson" ``` -------------------------------- ### Get Queryable Properties with curl Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Use curl to retrieve the list of queryable properties for a feature collection. ```bash # Get queryable properties curl "https://demo.ldproxy.net/vineyards/collections/vineyards/queryables" ``` -------------------------------- ### Get Feature Schema with curl Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Use curl to retrieve the JSON Schema for a feature collection. ```bash # Get feature schema (JSON Schema) curl "https://demo.ldproxy.net/vineyards/collections/vineyards/schema" ``` -------------------------------- ### Get Style in Mapbox Format with curl Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Retrieve a specific style definition in Mapbox format using curl. ```bash # Get style in Mapbox format curl "https://demo.ldproxy.net/vineyards/styles/default?f=mbs" ``` -------------------------------- ### Get OpenAPI Document as JSON with curl Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Retrieve the OpenAPI 3.0 documentation for the API in JSON format using curl. ```bash # Get OpenAPI document as JSON curl "https://demo.ldproxy.net/vineyards/api?f=json" ``` -------------------------------- ### Get Sortable Properties with curl Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Use curl to retrieve the list of sortable properties for a feature collection. ```bash # Get sortable properties curl "https://demo.ldproxy.net/vineyards/collections/vineyards/sortables" ``` -------------------------------- ### Get OGC API Features Collections Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Retrieves a list of available collections from the OGC API Features service. ```bash curl "https://demo.ldproxy.net/vineyards/collections" ``` -------------------------------- ### Get Features in Different CRS Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Retrieves features from the 'vineyards' collection, requesting the output in a specified Coordinate Reference System (CRS). ```bash curl "https://demo.ldproxy.net/vineyards/collections/vineyards/items?crs=http://www.opengis.net/def/crs/EPSG/0/25832" ``` -------------------------------- ### Get Collection Vector Tile Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Retrieves a specific vector tile for a given collection, zoom level (z), row (y), and column (x). ```bash curl "https://demo.ldproxy.net/vineyards/collections/vineyards/tiles/WebMercatorQuad/10/536/341?f=mvt" -o tile.mvt ``` -------------------------------- ### Get Specific Vector Tile Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Retrieves a specific vector tile for a given zoom level (z), row (y), and column (x). ```bash curl "https://demo.ldproxy.net/vineyards/tiles/WebMercatorQuad/8/134/85?f=mvt" -o tile.mvt ``` -------------------------------- ### Run ldproxy with Docker Source: https://github.com/interactive-instruments/ldproxy/blob/master/src/markdown/docs/en/application/30-deployment.md Downloads the latest ldproxy image, deploys it as a container, maps port 7080, and uses a Docker-provided volume for data storage. ```bash docker run -d -p 7080:7080 -v ldproxy_data:/data iide/ldproxy:latest ``` -------------------------------- ### Clone and Run ldproxy Locally Source: https://github.com/interactive-instruments/ldproxy/blob/master/README.md Clone the ldproxy repository and run the application using Gradle. A local server will be available at port 7080. ```bash git clone https://github.com/interactive-instruments/ldproxy.git cd ldproxy ./gradlew run ``` -------------------------------- ### List Available Styles with curl Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Use curl to list all available styles from the LDProxy service. ```bash # List available styles curl "https://demo.ldproxy.net/vineyards/styles" ``` -------------------------------- ### View Style as HTML Webmap with curl Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Fetch a style and render it as an HTML webmap using curl. ```bash # View style as HTML webmap curl "https://demo.ldproxy.net/vineyards/styles/default?f=html" ``` -------------------------------- ### LDProxy Startup Log Messages Source: https://github.com/interactive-instruments/ldproxy/blob/master/demo/vineyards/README.md These log messages indicate successful startup of the ldproxy service and the 'vineyards' API, including auto-generated configuration saving. ```text INFO [2021-12-18 07:29:00,945] - -------------------------------------------------- INFO [2021-12-18 07:29:00,948] - Starting ldproxy 3.1.0 INFO [2021-12-18 07:29:16,899] - Started web server at http://localhost:7080 INFO [2021-12-18 07:29:25,367] - Store mode: READ_WRITE INFO [2021-12-18 07:29:25,367] - Store location: /ldproxy/data/store INFO [2021-12-18 07:29:35,624] vineyards - Feature provider with id 'vineyards' is in auto mode, generating configuration ... INFO [2021-12-18 07:29:37,879] vineyards - Entity of type 'providers' with id 'vineyards' is in autoPersist mode, generated configuration was saved. INFO [2021-12-18 07:29:38,140] vineyards - Service with id 'vineyards' is in auto mode, generating configuration ... INFO [2021-12-18 07:29:38,410] vineyards - Entity of type 'services' with id 'vineyards' is in autoPersist mode, generated configuration was saved. INFO [2021-12-18 07:29:39,089] vineyards - Feature provider with id 'vineyards' started successfully. (min connections=8, max connections=8, stream capacity=8) INFO [2021-12-18 07:29:39,400] vineyards - Service with id 'vineyards' started successfully. ``` -------------------------------- ### Get Single Feature by ID Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Retrieves a single feature from the 'vineyards' collection using its unique ID. ```bash curl "https://demo.ldproxy.net/vineyards/collections/vineyards/items/306438" ``` -------------------------------- ### Extract and Run LDProxy Distribution Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Extract the created distribution archive and run the LDProxy executable. ```bash tar -xf ldproxy/build/distributions/ldproxy-*.tar ./ldproxy-*/bin/ldproxy ``` -------------------------------- ### Run ldproxy Docker Container Source: https://github.com/interactive-instruments/ldproxy/blob/master/src/markdown/docs/en/10-installation.md Use this command to download the latest ldproxy image, deploy it as a container, expose port 7080, and persist data. ```bash docker run --name ldproxy -d -p 7080:7080 -v ~/ldproxy_data:/data iide/ldproxy:latest ``` -------------------------------- ### Restart LDProxy Service Source: https://github.com/interactive-instruments/ldproxy/blob/master/demo/vineyards/README.md Execute this Docker command to restart the ldproxy service and load the new API configuration. Monitor logs for successful startup. ```bash docker restart ldproxy ``` -------------------------------- ### Create LDProxy Distribution Archive Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Generate a distribution archive (tar or zip) for LDProxy using Gradle tasks. ```bash ./gradlew distTar ``` ```bash # or ./gradlew distZip ``` -------------------------------- ### Run ldproxy with a specific host path for data Source: https://github.com/interactive-instruments/ldproxy/blob/master/src/markdown/docs/en/application/30-deployment.md Deploys ldproxy with a named container and maps a specific host directory (~/docker/ldproxy_data) to the container's /data volume for persistent storage. ```bash docker run --name ldproxy -d -p 7080:7080 -v ~/docker/ldproxy_data:/data iide/ldproxy:latest ``` -------------------------------- ### Configure HTML Presentation Settings Source: https://github.com/interactive-instruments/ldproxy/blob/master/demo/vineyards/README.md Use this configuration to control how API resources are presented in a web browser, including SEO indexing, schema.org markup, and footer links. ```yaml - buildingBlock: HTML enabled: true noIndexEnabled: true schemaOrgEnabled: true collectionDescriptionsInOverview: true legalName: Legal notice legalUrl: https://www.example.com/legal privacyName: Privacy notice privacyUrl: https://www.example.com/privacy basemapUrl: https://sg.geodatenzentrum.de/wmts_topplus_open/tile/1.0.0/web_grau/default/WEBMERCATOR/{z}/{y}/{x}.png basemapAttribution: '© Bundesamt für Kartographie und Geodäsie (2020), Datenquellen' defaultStyle: default ``` -------------------------------- ### Configure PostgreSQL/PostGIS Feature Provider Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Sets up a SQL feature provider to connect to PostgreSQL/PostGIS databases. Specifies connection details, primary and sort keys, native CRS, and defines data types and properties. ```yaml --- # store/entities/providers/vineyards.yml id: vineyards entityStorageVersion: 2 providerType: FEATURE featureProviderType: SQL connectionInfo: host: ${DB_HOST:-localhost} database: vineyards user: postgres password: sourcePathDefaults: primaryKey: ogc_fid sortKey: ogc_fid nativeCrs: code: 25832 forceAxisOrder: NONE defaultLanguage: en typeValidation: NONE types: vineyards: label: Vineyards description: | The vineyard register with wine-growing regions, sub-regions, and single vineyards. sourcePath: /vineyards type: OBJECT properties: registerId: sourcePath: wlg_nr type: INTEGER role: ID label: Vineyard register number name: sourcePath: wlg_name type: STRING label: Vineyard name area_ha: sourcePath: rebflache_ type: STRING label: Area in hectares transformations: stringFormat: "{{value | replace:'k. A.':'unknown' | replace:',':'.'}}" region: sourcePath: anbaugebie type: STRING label: Wine-growing region date: sourcePath: datum type: DATE role: PRIMARY_INSTANT label: Validity date geometry: sourcePath: wkb_geometry type: GEOMETRY role: PRIMARY_GEOMETRY geometryType: MULTI_POLYGON ``` -------------------------------- ### Enable Querying and Filtering Capabilities Source: https://github.com/interactive-instruments/ldproxy/blob/master/demo/vineyards/README.md Configure these building blocks to enable JSON schema, publication of queryable properties, CQL2 filtering, sorting, property selection, and geometry simplification. ```yaml - buildingBlock: SCHEMA enabled: true ``` ```yaml - buildingBlock: QUERYABLES enabled: true ``` ```yaml - buildingBlock: FILTER enabled: true ``` ```yaml - buildingBlock: SORTING enabled: true ``` ```yaml - buildingBlock: PROJECTIONS enabled: true ``` ```yaml - buildingBlock: GEOMETRY_SIMPLIFICATION enabled: true ``` -------------------------------- ### Clone LDProxy Repository Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Clone the LDProxy Git repository to your local machine to begin local development. ```bash git clone https://github.com/interactive-instruments/ldproxy.git cd ldproxy ``` -------------------------------- ### ldproxy Global Configuration (cfg.yml) Source: https://github.com/interactive-instruments/ldproxy/blob/master/demo/vineyards/README.md Basic global configuration for ldproxy, setting logging level and appenders. This file defines general settings for the proxy. ```yaml --- logging: level: 'OFF' appenders: - type: console loggers: de.ii: INFO ``` -------------------------------- ### Global ldproxy Configuration Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Configures global ldproxy settings including external URL, store mode, and logging levels. The `store.mode` can be set to `READ_WRITE` to allow runtime changes. ```yaml --- store: mode: READ_ONLY # READ_WRITE allows runtime changes server: externalUrl: https://www.example.com backgroundTasks: maxThreads: 4 # For parallel tile seeding logging: level: 'OFF' appenders: - type: console timeZone: Europe/Berlin loggers: de.ii: INFO ``` -------------------------------- ### Logging Internal Errors in Java Source: https://github.com/interactive-instruments/ldproxy/blob/master/src/markdown/dev/en/exceptions.md Log messages for internal errors should use the 'error' level, and the stacktrace should be logged at the 'debug' level. This example shows how to conditionally log the stacktrace. ```java LOGGER.error("Feature provider with id '{}' could not be started: {}", getId(), e.getMessage()); if (LOGGER.isDebugEnabled()) { LOGGER.debug("Stacktrace:", e); } ``` -------------------------------- ### Configure Vineyards API Service Source: https://github.com/interactive-instruments/ldproxy/blob/master/demo/vineyards/README.md Create this YAML file to define the 'vineyards' service. Ensure the 'id' matches the filename. 'auto' and 'autoPersist' enable automatic configuration generation and saving. ```yaml id: vineyards entityStorageVersion: 2 serviceType: OGC_API auto: true autoPersist: true ``` -------------------------------- ### Update ldproxy using Docker Source: https://github.com/interactive-instruments/ldproxy/blob/master/src/markdown/docs/en/application/30-deployment.md Stops and removes the existing ldproxy container, then creates a new one using the latest image. Data is preserved due to volume mounting. ```bash docker stop ldproxy docker rm ldproxy docker run --name ldproxy -d -p 7080:7080 -v ~/docker/ldproxy_data:/data iide/ldproxy:latest ``` -------------------------------- ### Enable Vector Tile Support Source: https://github.com/interactive-instruments/ldproxy/blob/master/demo/vineyards/README.md Activate vector tile support for datasets, specifying tiling schemes, zoom levels, and MBTiles caching. ```yaml - buildingBlock: TILES enabled: true cache: MBTILES tileProvider: type: FEATURES multiCollectionEnabled: true zoomLevels: WebMercatorQuad: min: 5 max: 16 seeding: WebMercatorQuad: min: 5 max: 11 ``` -------------------------------- ### Load SQL Dump into PostgreSQL Source: https://github.com/interactive-instruments/ldproxy/blob/master/demo/vineyards/README.md Commands to load DDL and DML SQL scripts into a PostgreSQL database. Ensure the database is already created and accessible. ```bash psql -Upostgres -hlocalhost -p5432 vineyards < vineyards.ddl.sql psql -Upostgres -hlocalhost -p5432 vineyards < vineyards.dml.sql ``` -------------------------------- ### View Swagger UI with curl Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Access the Swagger UI (HTML) for the API documentation using curl. ```bash # View Swagger UI (HTML) curl "https://demo.ldproxy.net/vineyards/api?f=html" ``` -------------------------------- ### View ldproxy Container Logs Source: https://github.com/interactive-instruments/ldproxy/blob/master/src/markdown/docs/en/10-installation.md Access the logs of the ldproxy container to troubleshoot if the service is not responding. ```bash docker logs ldproxy ``` -------------------------------- ### Configure OGC API Service Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Sets up an OGC API service with metadata, building blocks, and collections. This configuration enables features like CRS, HTML representation, schema, queryables, filtering, sorting, projections, and geometry simplification. ```yaml --- # store/entities/services/vineyards.yml id: vineyards entityStorageVersion: 2 serviceType: OGC_API label: Vineyards in Rhineland-Palatinate, Germany description: | API providing vineyard register data from Rhineland-Palatinate. metadata: contactName: Jane Doe contactEmail: doe@example.com creatorName: Landwirtschaftskammer Rheinland-Pfalz creatorUrl: https://www.lwk-rlp.de/ licenseName: Datenlizenz Deutschland - Namensnennung - Version 2.0 licenseUrl: https://www.govdata.de/dl-de/by-2-0 attribution: '© Landwirtschaftskammer RLP (2020), dl-de/by-2-0' apiValidation: NONE api: - buildingBlock: CRS enabled: true additionalCrs: - code: 25832 forceAxisOrder: NONE - code: 4326 forceAxisOrder: NONE - code: 3857 forceAxisOrder: NONE - buildingBlock: HTML enabled: true noIndexEnabled: true schemaOrgEnabled: true collectionDescriptionsInOverview: true basemapUrl: https://tile.openstreetmap.org/{z}/{x}/{y}.png basemapAttribution: '© OpenStreetMap contributors' defaultStyle: default - buildingBlock: SCHEMA enabled: true - buildingBlock: QUERYABLES enabled: true - buildingBlock: FILTER enabled: true - buildingBlock: SORTING enabled: true - buildingBlock: PROJECTIONS enabled: true - buildingBlock: GEOMETRY_SIMPLIFICATION enabled: true ``` -------------------------------- ### Paginate Features with Limit and Offset Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Retrieves features from the 'vineyards' collection with specified limit and offset for pagination. ```bash curl "https://demo.ldproxy.net/vineyards/collections/vineyards/items?limit=100&offset=200" ``` -------------------------------- ### Check Running Docker Processes Source: https://github.com/interactive-instruments/ldproxy/blob/master/src/markdown/docs/en/10-installation.md Verify that the ldproxy Docker container is running by listing active containers. ```bash docker ps ``` -------------------------------- ### Enable TILES Building Block Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Configures the TILES building block at the API level to enable vector tile access. ```yaml - buildingBlock: TILES enabled: true tileProviderTileset: vineyards tileSetEncodings: - JSON - TileJSON mapClientType: MAP_LIBRE style: default ``` -------------------------------- ### Enable Map Style Support Source: https://github.com/interactive-instruments/ldproxy/blob/master/demo/vineyards/README.md Configure support for map styles, including Mapbox and HTML encodings, and options for deriving collection-level styles from API-level styles. ```yaml - buildingBlock: STYLES enabled: true styleEncodings: - Mapbox - HTML deriveCollectionStyles: true ``` -------------------------------- ### Configure Tile Provider for Vineyards Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Defines the configuration for a tile provider, including seeding options, caching strategies, and tileset details. ```yaml --- # store/entities/providers/vineyards-tiles.yml id: vineyards-tiles providerType: TILE providerSubType: FEATURES seeding: runOnStartup: true runPeriodic: '0 * * * *' # Every hour purge: true maxThreads: 4 caches: - type: IMMUTABLE storage: MBTILES levels: WebMercatorQuad: min: 5 max: 12 - type: DYNAMIC storage: MBTILES seeded: false levels: WebMercatorQuad: min: 13 max: 18 tilesets: vineyards: id: vineyards center: lon: 7.35 lat: 49.8 levels: WebMercatorQuad: min: 5 max: 18 default: 8 transformations: WebMercatorQuad: - min: 5 max: 7 merge: true groupBy: - region ``` -------------------------------- ### Full-Text Search for Features Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Performs a full-text search on features using the 'q' parameter. ```bash curl "https://demo.ldproxy.net/vineyards/collections/vineyards/items?q=Riesling" ``` -------------------------------- ### Default Service Configuration (OGC API) Source: https://context7.com/interactive-instruments/ldproxy/llms.txt YAML configuration for default OGC API service settings, including API catalog details and coordinate precision. ```yaml --- # store/defaults/services/ogc_api.yml api: - buildingBlock: FOUNDATION includeLinkHeader: true useLangParameter: false apiCatalogLabel: 'My APIs' apiCatalogDescription: 'Web APIs providing geospatial data' - buildingBlock: FEATURES_CORE coordinatePrecision: metre: 2 degree: 7 ``` -------------------------------- ### Global Server Configuration for LDProxy Source: https://github.com/interactive-instruments/ldproxy/blob/master/demo/vineyards/README.md This YAML configuration sets global server properties for LDProxy, including the read-only store mode, the external URL for server accessibility, and logging levels and appenders. ```yaml --- store: mode: READ_ONLY server: externalUrl: https://www.example.com logging: level: 'OFF' appenders: - type: console timeZone: Europe/Berlin loggers: de.ii: INFO ``` -------------------------------- ### ldproxy Data Provider Configuration (vineyards.yml) Source: https://github.com/interactive-instruments/ldproxy/blob/master/demo/vineyards/README.md Configuration for a PostgreSQL data provider in ldproxy. This file specifies connection details and source path defaults for the 'vineyards' dataset. ```yaml --- id: vineyards entityStorageVersion: 2 providerType: FEATURE featureProviderType: SQL connectionInfo: connectorType: SLICK host: localhost database: vineyards user: postgres password: dialect: PGIS sourcePathDefaults: primaryKey: ogc_fid sortKey: ogc_fid auto: true autoPersist: true ``` -------------------------------- ### Configure TILES Building Block Rules Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Defines collection-level tile transformations for the TILES building block, specifying merge and groupBy options for different zoom levels. ```yaml - buildingBlock: TILES rules: WebMercatorQuad: - min: 5 max: 7 merge: true groupBy: - region - min: 8 max: 9 merge: true groupBy: - region - subregion ``` -------------------------------- ### Enable CRUD Building Block Configuration Source: https://context7.com/interactive-instruments/ldproxy/llms.txt YAML configuration to enable the CRUD (Create, Read, Update, Delete) building block for transactional feature data operations. ```yaml # Configuration - buildingBlock: CRUD enabled: true optimisticLockingLastModified: false ``` -------------------------------- ### FEATURES_HTML Building Block Configuration Source: https://context7.com/interactive-instruments/ldproxy/llms.txt YAML configuration for the FEATURES_HTML building block, defining custom templates and transformations for feature rendering. ```yaml - buildingBlock: FEATURES_HTML featureTitleTemplate: '{{searchfield2}}' transformations: village_info: remove: ALWAYS searchfield1: remove: IN_COLLECTION date: remove: IN_COLLECTION dateFormat: dd/MM/yyyy area_ha: stringFormat: '{{value}} ha' ``` -------------------------------- ### Configure Additional CRS Support Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Add support for custom Coordinate Reference Systems (CRS) by listing their codes and axis order preferences in the configuration. ```yaml - buildingBlock: CRS enabled: true additionalCrs: - code: 25832 # ETRS89 / UTM zone 32N forceAxisOrder: NONE - code: 4258 # ETRS89 (geographic) forceAxisOrder: NONE - code: 4326 # WGS 84 forceAxisOrder: NONE - code: 3857 # Web Mercator forceAxisOrder: NONE ``` -------------------------------- ### Configure Vineyards Collection in LDProxy Source: https://github.com/interactive-instruments/ldproxy/blob/master/demo/vineyards/README.md This YAML configuration defines settings for the 'vineyards' collection, enabling spatial, temporal, and queryable properties for filtering, supporting sorting, customizing HTML feature titles and transformations, and aggregating vineyards in vector tiles. ```yaml collections: vineyards: id: vineyards label: vineyards enabled: true api: - buildingBlock: FEATURES_CORE enabled: true itemType: feature queryables: spatial: - geometry temporal: - date q: - name - region - subregion - cluster - village - searchfield1 - searchfield2 other: - registerId - area_ha - buildingBlock: SORTING enabled: true sortables: - name - region - subregion - cluster - village - registerId - area_ha - buildingBlock: FEATURES_HTML featureTitleTemplate: '{{searchfield2}}' transformations: village_info: remove: ALWAYS searchfield1: remove: IN_COLLECTION date: remove: IN_COLLECTION dateFormat: dd/MM/yyyy - buildingBlock: TILES rules: WebMercatorQuad: - min: 5 max: 7 merge: true groupBy: - region - min: 8 max: 8 merge: true groupBy: - region - subregion - min: 9 max: 9 merge: true groupBy: - region - subregion - cluster ``` -------------------------------- ### Configure FEATURES_CORE Building Block Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Configures core feature access at the API level, specifying coordinate precision, default page size, and maximum page size for feature requests. ```yaml # At API level (defaults) - buildingBlock: FEATURES_CORE coordinatePrecision: metre: 2 degree: 7 defaultPageSize: 10 maximumPageSize: 10000 ``` -------------------------------- ### Load Shapefile into PostgreSQL using ogr2ogr Source: https://github.com/interactive-instruments/ldproxy/blob/master/demo/vineyards/README.md Command to load a shapefile into a PostgreSQL database using GDAL's ogr2ogr utility. Adjust connection parameters and encoding as needed. ```bash ogr2ogr -append -f "PostgreSQL" PG:"dbname=vineyards host=localhost port=5432 user=postgres" Weinlagen.shp -nln vineyards -nlt PROMOTE_TO_MULTI -oo ENCODING="ISO-8859-1" ``` -------------------------------- ### Updated Services Configuration File Source: https://github.com/interactive-instruments/ldproxy/blob/master/demo/vineyards/README.md This is the auto-generated services configuration file for the 'vineyards' entity after ldproxy restart. It defines the service type and collections available. ```yaml --- id: vineyards createdAt: 1639812575613 lastModified: 1639812575613 entityStorageVersion: 2 label: vineyards serviceType: OGC_API collections: vineyards: id: vineyards label: vineyards enabled: true api: - buildingBlock: FEATURES_CORE queryables: spatial: - wkb_geometry temporal: - datum ``` -------------------------------- ### Enable Sorting for Features Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Configures the SORTING building block to enable sorting of feature results by specified properties. ```yaml - buildingBlock: SORTING enabled: true sortables: - name - region - subregion - registerId - area_ha ``` -------------------------------- ### TILES Building Block Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Enable vector tile access for feature data using Mapbox Vector Tiles format. ```APIDOC ## GET /vineyards/tiles ### Description Get metadata for available tilesets. ### Method GET ### Endpoint /vineyards/tiles ### Response #### Success Response (200) - Returns tileset metadata. ### Response Example ```json { "name": "vineyards", "description": "Vineyard tileset" } ``` ## GET /vineyards/tiles/WebMercatorQuad?f=tilejson ### Description Get TileJSON metadata for the WebMercatorQuad tileset. ### Method GET ### Endpoint /vineyards/tiles/WebMercatorQuad ### Query Parameters - **f** (string) - Required - Format, must be 'tilejson'. ### Response #### Success Response (200) - Returns TileJSON metadata. ### Response Example ```json { "tilejson": "2.1.0", "name": "vineyards", "version": "1.0.0", "minzoom": 5, "maxzoom": 18, "center": "7.35,49.8,8", "tiles": [ "https://demo.ldproxy.net/vineyards/tiles/WebMercatorQuad/{z}/{x}/{y}?f=mvt" ] } ``` ## GET /vineyards/tiles/WebMercatorQuad/{z}/{x}/{y}?f=mvt ### Description Retrieve a specific vector tile in Mapbox Vector Tiles format. ### Method GET ### Endpoint /vineyards/tiles/WebMercatorQuad/{z}/{x}/{y} ### Parameters #### Path Parameters - **z** (integer) - Required - Zoom level. - **x** (integer) - Required - Tile x coordinate. - **y** (integer) - Required - Tile y coordinate. ### Query Parameters - **f** (string) - Required - Format, must be 'mvt'. ### Response #### Success Response (200) - Returns the vector tile data. ### Response Example ```bash curl "https://demo.ldproxy.net/vineyards/tiles/WebMercatorQuad/8/134/85?f=mvt" -o tile.mvt ``` ## GET /vineyards/collections/vineyards/tiles/WebMercatorQuad/{z}/{x}/{y}?f=mvt ### Description Retrieve a specific vector tile for the vineyards collection. ### Method GET ### Endpoint /vineyards/collections/vineyards/tiles/WebMercatorQuad/{z}/{x}/{y} ### Parameters #### Path Parameters - **z** (integer) - Required - Zoom level. - **x** (integer) - Required - Tile x coordinate. - **y** (integer) - Required - Tile y coordinate. ### Query Parameters - **f** (string) - Required - Format, must be 'mvt'. ### Response #### Success Response (200) - Returns the vector tile data for the collection. ### Response Example ```bash curl "https://demo.ldproxy.net/vineyards/collections/vineyards/tiles/WebMercatorQuad/10/536/341?f=mvt" -o tile.mvt ``` ``` -------------------------------- ### Updated Providers Configuration File Source: https://github.com/interactive-instruments/ldproxy/blob/master/demo/vineyards/README.md This is the auto-generated providers configuration file for the 'vineyards' entity after ldproxy restart. It details connection information and data properties. ```yaml --- id: vineyards createdAt: 1639812575490 lastModified: 1639812575490 entityStorageVersion: 2 providerType: FEATURE featureProviderType: SQL nativeCrs: code: 25832 forceAxisOrder: NONE connectionInfo: database: vineyards host: localhost user: postgres password: sourcePathDefaults: primaryKey: ogc_fid sortKey: ogc_fid types: vineyards: sourcePath: /vineyards type: OBJECT properties: ogc_fid: sourcePath: ogc_fid type: INTEGER role: ID wlg_nr: sourcePath: wlg_nr type: INTEGER datum: sourcePath: datum type: DATETIME role: PRIMARY_INSTANT suchfeld: sourcePath: suchfeld type: STRING suchfeld_1: sourcePath: suchfeld_1 type: STRING anbaugebie: sourcePath: anbaugebie type: STRING bereich: sourcePath: bereich type: STRING grosslage: sourcePath: grosslage type: STRING wlg_name: sourcePath: wlg_name type: STRING gemeinde: sourcePath: gemeinde type: STRING gemarkunge: sourcePath: gemarkunge type: STRING rebflache_: sourcePath: rebflache_ type: STRING gem_info: sourcePath: gem_info type: STRING gid: sourcePath: gid type: FLOAT wkb_geometry: sourcePath: wkb_geometry type: GEOMETRY role: PRIMARY_GEOMETRY geometryType: MULTI_POLYGON ``` -------------------------------- ### Create New Feature with curl Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Use curl to create a new feature using a POST request with GeoJSON data. ```bash # Create a new feature (POST) curl -X POST "https://example.com/api/collections/features/items" \ -H "Content-Type: application/geo+json" \ -d '{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [7.35, 49.8] }, "properties": { "name": "New Feature", "description": "A test feature" } }' ``` -------------------------------- ### Sort Features Ascending by Name Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Sorts features in ascending order based on the 'name' property. ```bash curl "https://demo.ldproxy.net/vineyards/collections/vineyards/items?sortby=name" ``` -------------------------------- ### OGC API Features - Access Features Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Retrieve features via HTTP with filtering, pagination, and format negotiation. ```APIDOC ## GET /vineyards ### Description Get the landing page for the API. ### Method GET ### Endpoint /vineyards ### Response #### Success Response (200) - Returns landing page information. ### Response Example ```json { "title": "Vineyards API", "description": "API for accessing vineyard data." } ``` ## GET /vineyards/collections ### Description Retrieve a list of available collections. ### Method GET ### Endpoint /vineyards/collections ### Response #### Success Response (200) - Returns a list of collections. ### Response Example ```json [ { "id": "vineyards", "label": "vineyards" } ] ``` ## GET /vineyards/collections/vineyards/items ### Description Retrieve features from the vineyards collection. Supports filtering, pagination, and format negotiation. ### Method GET ### Endpoint /vineyards/collections/vineyards/items ### Query Parameters - **f** (string) - Optional - Desired output format (e.g., geojson, html). - **limit** (integer) - Optional - Maximum number of features to return. - **offset** (integer) - Optional - Number of features to skip. - **crs** (string) - Optional - Coordinate reference system for the output. - **bbox** (string) - Optional - Bounding box filter (minLon, minLat, maxLon, maxLat). - **bbox-crs** (string) - Optional - CRS for the bbox parameter. - **datetime** (string) - Optional - Temporal filter (date or interval). - **filter** (string) - Optional - CQL2 filter expression. - **filter-lang** (string) - Optional - Language of the filter expression (e.g., cql2-text). - **q** (string) - Optional - Full-text search query. ### Response #### Success Response (200) - Returns features in the requested format. ### Response Example ```json { "type": "FeatureCollection", "features": [ { "type": "Feature", "id": "306438", "properties": { "name": "Example Vineyard", "region": "Mosel", "village": "Bernkastel", "registerId": "12345", "area_ha": 10.5 }, "geometry": { "type": "Polygon", "coordinates": [ [ [7.0, 49.5], [7.5, 49.5], [7.5, 50.0], [7.0, 50.0], [7.0, 49.5] ] ] } } ] } ``` ## GET /vineyards/collections/vineyards/items/{id} ### Description Retrieve a single feature by its ID. ### Method GET ### Endpoint /vineyards/collections/vineyards/items/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the feature to retrieve. ### Response #### Success Response (200) - Returns the specified feature. ### Response Example ```json { "type": "Feature", "id": "306438", "properties": { "name": "Example Vineyard", "region": "Mosel", "village": "Bernkastel", "registerId": "12345", "area_ha": 10.5 }, "geometry": { "type": "Polygon", "coordinates": [ [ [7.0, 49.5], [7.5, 49.5], [7.5, 50.0], [7.0, 50.0], [7.0, 49.5] ] ] } } ``` ``` -------------------------------- ### Specify Bounding Box in Different CRS Source: https://context7.com/interactive-instruments/ldproxy/llms.txt When specifying a bounding box (bbox), use the 'bbox-crs' parameter to define the Coordinate Reference System of the provided coordinates. ```bash curl "https://demo.ldproxy.net/vineyards/collections/vineyards/items?bbox=7,49,8,50&bbox-crs=http://www.opengis.net/def/crs/EPSG/0/4326" ``` -------------------------------- ### Filter Features by Date Source: https://context7.com/interactive-instruments/ldproxy/llms.txt Filters features based on a specific date. ```bash curl "https://demo.ldproxy.net/vineyards/collections/vineyards/items?datetime=2020-01-01" ```