pdok / goaf Goto Github PK
View Code? Open in Web Editor NEWImplementation of the OCG API - Features specification
License: MIT License
Implementation of the OCG API - Features specification
License: MIT License
INSPIRE addresses in alternative encoding have been generated using the following SQL query (assuming databases with normalized datamodel voor INSPIRE addresses) according to these transformation rules:
create schema oaf_poc_2021;
create view oaf_poc_2021.simple_inspire_ad as
select '' as alternativeIdentifier,
ad.validfrom,
ad.validto,
null as beginLifespanVersion,
null as endLifespanVersion,
'' as building,
tfname.thoroughfarename as component_ThoroughfareName,
pdesc.postaldescriptor as component_PostalDescriptor,
adaname.addressareaname as component_AddressAreaName,
'' as component_AdminUnitName_1,
'' as component_AdminUnitName_2,
'' as component_AdminUnitName_3,
'' as component_AdminUnitName_4,
'' as component_AdminUnitName_5,
'' as component_AdminUnitName_6,
ad.designator_type_two as locator_designator_addressNumber,
ad.designator_type_three as locator_designator_addressNumberExtension,
ad.designator_type_four locator_designator_addressNumber2ndExtension,
'unit level' as locator_level,
'http://inspire.ec.europa.eu/codelist/LocatorLevelValue/unitLevel' as locator_href,
'' as locator_designator_buildingIdentifier,
'' as locator_designator_buildingIdentifierPrefix,
'' as locator_designator_cornerAddress1stIdentifier,
'' as locator_designator_cornerAddress2ndIdentifier,
'' as locator_designator_entranceDoorIdentifier,
'' as locator_designator_floorIdentifier,
'' as locator_designator_kilometrePoint,
'' as locator_designator_postalDeliveryIdentifier,
'' as locator_designator_staircaseIdentifier,
'' as locator_designator_unitIdentifier,
'' as locator_name,
'' as parcel,
'' as parentAddress,
ad.geom as geom,
'entrance' as position_specification,
'http://inspire.ec.europa.eu/codelist/GeometrySpecificationValue/entrance' as position_specification_href,
'by administrator' as position_method,
'http://inspire.ec.europa.eu/codelist/GeometryMethodValue/byAdministrator' as position_method_href,
true as position_default,
'' as status,
'' as status_href
from inspire_ad
.address ad
INNER JOIN inspire_ad.thoroughfarename tfname on ad.thoroughfarename_id = tfname.localid
INNER JOIN inspire_ad.postaldescriptor pdesc on ad.postaldescriptor_id = pdesc.localid
INNER JOIN inspire_ad.addressareaname adaname on ad.addressareaname_id = adaname.localid
;
Using this view a GeoPackage can be generated with ogr2ogr
:
export PGPASSWORD="postgres"
export PGCONN="PG:dbname='pdok' host='my-db-host' port='5432` user='postgres'"; ogr2ogr -f GPKG data.gpkg "$PGCONN" -oo ACTIVE_SCHEMA=oaf_poc_2021 -sql "select * from simple_inspire_ad where geom &&
ST_MakeEnvelope(4.6445,52.9685,4.9466,53.2027,4258)" -nln simple_inspire_ad
Note that with the above command the data is still in its source projection, namely EPSG:4258
.
Cluster data on geohash for better usability when browsing data (features will be in same area when paging through features):
CREATE INDEX simple_inspire_ad_texel_geohash ON oaf_poc_2021.simple_inspire_ad_texel (ST_GeoHash(ST_Transform(geom,4326)));
CLUSTER oaf_poc_2021.simple_inspire_ad_texel USING simple_inspire_ad_texel_geohash;
the current classes are using the old wfs-1/3.0/.. URI's
zie text/template docs:
To generate HTML output, see package html/template, which has the same interface as this package but automatically secures HTML output against certain attacks.
Om te voorkomen dat er in de toekomst nog template-gerelateerde lijken uit de kast gaan vallen.
http://docs.opengeospatial.org/DRAFTS/17-069r4.html -> 8.3. Requirements Class "GeoJSON"
created #13
need to lowercase the yaml config files
update the feature viewers to use webmercator for basemap and wgs84 for the features retrieved from (g)oaf.
Currently the viewer is duplicated twice:
Refactor so both components use the same viewer js template, but with some config.
See OGC validator
I would assume that licenses are only applicable on dataset level, maybe can be set on service level if licenses for all collections are the same.
See Requirement 9 /req/core/query-param-invalid: The server SHALL respond with a response with the status code 400, if the request URI includes a query parameter that has an invalid value.
Two known issues (possibly more):
like the title suggest we need to rename the application/repo/parts of the code, to scrub out the old OAF name of WFS3.0.
Currently some config options can only be from the environment or as CLI param.
All config options should be configurable from one yaml file.
The example data used now is a very specific Dutch database, it would be better to swap it out with a more 'common' known dataset like Addresses/Building (or something along those lines)
The yaml contains now a lot of Kadaster/PDOK specific configuration
Currently not implemented; see spec
Make it possible to configure Links.
One of the practical uses would be a Link pointing towards the "full" dataset (URL containing a prepared download)
The postgis implementation is layered around the jsonb type, while this is a fast solution. It does require some effort regarding the preperation of the data, this also applies to our docker-compose example.
To get the example working without issues/obstakels when need to prepare some example data that can be imported efficiently in to postgis
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.