Code Monkey home page Code Monkey logo

Comments (4)

hylkevds avatar hylkevds commented on September 25, 2024

Good points.
deo.distance is passed to the postgis ST_Distance function that states:
For geometry type returns the minimum 2D Cartesian distance between two geometries in projected units (spatial ref units).

So we should specify the projection in the respective tables to ensure a consistent result.

from frost-server.

aditisg17 avatar aditisg17 commented on September 25, 2024

I have two questions -

  1. What should then be the chosen SRID?
  2. Who is supposed to set it? If user, then how to set it?

from frost-server.

hylkevds avatar hylkevds commented on September 25, 2024

Since GeoJSON specifies WGS 84, and since GeoJSON is the suggested format in the SensorThingsAPI, I would suggest using that, since it means the database doesn't have to do any conversion.

I can update the liquibase database script to update the tables automatically, and users can change the database table manually with:
alter table "LOCATIONS" alter column "GEOM" type geometry(Geometry,4326) USING ST_Force2D(ST_SetSRID("GEOM", 4326));

The SensorThingsAPI standard does not specify the units of either geo.distance or geo.length. That might be an issue worth raising on https://github.com/opengeospatial/sensorthings

from frost-server.

hylkevds avatar hylkevds commented on September 25, 2024

We now use 4326 as srid in the geometry columns.
This relates to issue #18, that requests making this configurable.

from frost-server.

Related Issues (20)

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.