Giter Club home page Giter Club logo

goaf's People

Contributors

arbakker avatar boazhuisman avatar dennisrutjes avatar kostegit avatar woutervisscher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

goaf's Issues

update the example data

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)

"custom" configurable Links

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)

replace text/template lib with html/template

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.

proper postgis docker-compose example

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

Bevindingen high5 GeoNovum-PDOK

  • vraag: Wat te doen met structureel lege velden in alternative encoding? (want in brondata ontreken deze velden)
  • vraag: Is het logisch om bij het uitserveren van data in INSPIRE simplified encoding te linken naar de volledige download van de geharmonizeerde encoding versie? Of is een simplified encoding van een geharmonizeerde dataset een eigen dataset?
    Als je beide aanbiedt in service als full download, hoe maak je onderscheid tussen de twee verschillende versies (geharmonizeerd en simplified)?
  • Spec lijkt niets te zeggen over response body in het geval van errors. Wat is best practice? Is dit altijd een json response, of respecteert dit de request content-type in grote lijnen (geojson,jsonld,json-> json, html>html) http://docs.opengeospatial.org/is/17-069r3/17-069r3.html#http_status_codes

ETL for generating data in (simple) alternative encoding

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;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.