Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How postgis changed the insurance market in Brazil

How postgis changed the insurance market in Brazil

We can offer a one-size-fits-all product, or we can truly understand our users and offer something valuable and customized to their needs. Geolocation is the key to learn what is going on around them to make better, user-centric decisions.

Artur Caliendo Prado

June 29, 2018
Tweet

More Decks by Artur Caliendo Prado

Other Decks in Technology

Transcript

  1. http://arturprado.com/

    View full-size slide

  2. Artur Caliendo Prado
    http://arturprado.com/
    [email protected]
    @artur.prado @artur_caliendo
    @arturcp

    View full-size slide

  3. il percorso degli aerei
    Dove siamo?
    il sistema di coordinate
    il problema da risolvere
    Postgis
    Funzioni

    View full-size slide

  4. il percorso degli aerei
    Dove siamo?
    il sistema di coordinate
    il problema da risolvere
    Postgis
    Funzioni

    View full-size slide

  5. Sistema geometrico

    View full-size slide

  6. Sistema Geografico

    View full-size slide

  7. https://thetruesize.com/

    View full-size slide

  8. Non tutte le ciambelle escono col buco.

    View full-size slide

  9. il percorso degli aerei
    Dove siamo?
    il sistema di coordinate
    il problema per risolvere
    Postgis
    Funzioni

    View full-size slide

  10. il percorso degli aerei
    Dove siamo?
    il sistema di coordinate
    il problema da risolvere
    Postgis
    Funzioni

    View full-size slide

  11. ● PSC - project steering
    committee
    ● OSGeo - Open Source
    Geospatial Foundation
    ● Regione Toscana - SITA
    cartoteca
    ● Associazione Italiana per
    l'Informazione Geografica
    Libera (GFOSS.it)
    ● Supporto gratuito o a
    pagamento

    View full-size slide

  12. Installazione
    http://postgis.net/install/
    Postgres.App
    brew install postgis
    yum install postgis

    View full-size slide

  13. SRID
    Spatial Reference Identifier

    View full-size slide

  14. Cilindrica Piana Conica

    View full-size slide

  15. il percorso degli aerei
    Dove siamo?
    il sistema di coordinate
    il problema da risolvere
    Postgis
    Funzioni

    View full-size slide

  16. ST_SRID
    SELECT
    id,
    name,
    ST_SRID(coordinates) as srid
    FROM boundaries
    WHERE id = 3828;

    View full-size slide

  17. ST_Point
    Latitudine: -23.625531
    Longitudine: -46.640963
    SELECT ST_Point(-46.640963, -23.625531)

    View full-size slide

  18. ST_AsText
    SELECT ST_AsText(
    ST_Point(-46.640963, -23.625531)
    ) as point;

    View full-size slide

  19. ST_Transform
    SELECT ST_AsText(
    ST_Transform(ST_Point(-46.640963, -23.625531), 3857)
    );

    View full-size slide

  20. ST_SetSRID
    SELECT ST_SetSRID(ST_Point(-46.640963, -23.625531), 4326);

    View full-size slide

  21. ST_Transform
    SELECT ST_AsText(
    ST_Transform(
    ST_SetSRID(
    ST_Point(-46.640963, -23.625531), 4326
    ), 3857
    ));

    View full-size slide

  22. ST_Covers
    SELECT id, name
    FROM boundaries
    WHERE ST_Covers(
    boundaries.coordinates,
    ST_Transform(ST_SetSRID(ST_Point(-46.640963, -23.625531),
    4326), 3857)
    );

    View full-size slide

  23. ST_DistanceSphere
    SELECT
    name AS origin,
    'Youse' AS destination,
    ST_DistanceSphere(
    point,
    ST_Transform(ST_SetSRID(ST_Point(-46.6824622, -23.5941306), 4326), 3857)
    ) AS distance
    FROM markers
    WHERE id = 174;

    View full-size slide

  24. https://postgis.net/docs/reference.html

    View full-size slide

  25. http://arturprado.com/
    [email protected]
    @artur.prado

    View full-size slide