Giter VIP home page Giter VIP logo

mapmatching's Introduction

Map Matching

ADICIONANDO A DEPENDÊNCIA:

To make a library available, a Jitpack platform will be used, which shares a more original version of the repository.

  • Add the repository in pom.xml:
<repositories>
  <repository>
  <id>jitpack.io</id>
  <url>https://jitpack.io</url>
  </repository>
</repositories>
  • Add the dependency in pom.xml:
<dependency>
    <groupId>com.github.gabrielczar</groupId>
    <artifactId>MapMatching</artifactId>
    <version>1.3.0</version>
</dependency>

Using Docker Container Postgres

  • Create local to save postgres data

docker volume create pg_data

  • Create instance posgres with postgis extension
docker run --name=trajectory-data-postgis -d -e POSTGRES_USER=postgres -e POSTGRES_PASS=postgres -e POSTGRES_DBNAME=trajectory-data -e ALLOW_IP_RANGE=0.0.0.0/0 -p 5432:5432 -v pg_data:/var/lib/postgresql --restart=always kartoza/postgis:9.6-2.4

Extra Queries

Create table

  • Create table to save output
CREATE TABLE matched_points (
	id serial primary key,
	natural_id integer, 
 	datetime timestamp,
 	longitude double precision,
 	latitude double precision,
	edge_id bigint,
	offset double precision,
	geometry point
);
  • Create table with content
CREATE TABLE dataset (
 id serial primary key,  
 natural_id integer, 
 datetime timestamp,
 longitude double precision,
 latitude double precision
);

Aditional columns

  • Add column for geometry
ALTER TABLE dataset ADD COLUMN geom GEOMETRY;
  • Add aditional column for serial id in dataset
ALTER TABLE dataset ADD COLUMN ID SERIAL PRIMARY KEY;

Aditional update values

  • Create geometrys for each dataset location
update dataset
set geom = ST_SetSRID(ST_MakePoint(t.long, t.lat), 4326)
from (
       select id, longitude as long, 
         latitude as lat from dataset) as t
WHERE t.id = dataset.id;

Aditional queries

  • Search by date interval
SELECT * FROM dataset WHERE date_time::date >= date '2008-02-02' AND date_time::date < date '2008-02-03';

mapmatching's People

Contributors

gabrielczar avatar

Stargazers

 avatar

Watchers

 avatar  avatar

mapmatching's Issues

Parameter Estimation

It's necessary estimation of a parameter, the distance max between 2 points for the algorithm don't break. Dinamic or Constant.

Pre processing

Verificar a possibilidade de execucao do pre processamento antes de executar o matching

Return atributes

Id - Integer
latitude - double
longitude - double
time - timestamp
geom - geometry
edge_id - integer
offset - double
gid - serial

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.