Code Monkey home page Code Monkey logo

mobilitydb-sqlalchemy's People

Contributors

anitagraser avatar chaitan94 avatar mbenngit avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

mobilitydb-sqlalchemy's Issues

pip install mobilitydb-sqlalchemy

Pandas never completes compiling pandas 0.25.3 when installing the mobilitydb-sqlalchemy package.
Pandas 1.4.2 is already installed is it possible to omit pandas 0.25.3 installation while executing the subject command?
Thank you.

** verify pandas installed

root@74c5ed76b1e1:/tmp# python3
Python 3.10.4 (main, Apr  2 2022, 09:04:19) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
>>> pandas.__version__
'1.4.2'

** attempt mobilitydb-sqlalchemy installation


>>> root@74c5ed76b1e1:/tmp# pip3 install mobilitydb-sqlalchemy                  
Collecting mobilitydb-sqlalchemy                                                                                                                                           
  Downloading mobilitydb-sqlalchemy-0.4.tar.gz (11 kB)                               
  Installing build dependencies ... done                                                                                                                                   
  Getting requirements to build wheel ... done                                       
  Preparing metadata (pyproject.toml) ... done                                                                                                                             
Collecting geoalchemy2<0.9.0,>=0.8.4  
  Downloading GeoAlchemy2-0.8.5-py2.py3-none-any.whl (26 kB)                                                                                                               
Requirement already satisfied: sqlalchemy<2.0.0,>=1.3.18 in /usr/local/lib/python3.10/dist-packages (from mobilitydb-sqlalchemy) (1.4.37)
Collecting mobilitydb-sqlalchemy                                                                                                                                           
  Downloading mobilitydb_sqlalchemy-0.3-py3-none-any.whl (10 kB)                     
Requirement already satisfied: shapely<2.0.0,>=1.7.0 in /usr/local/lib/python3.10/dist-packages (from mobilitydb-sqlalchemy) (1.8.2)                                       
  Downloading mobilitydb_sqlalchemy-0.2.1-py3-none-any.whl (10 kB)                   
Collecting geoalchemy2<0.7.0,>=0.6.3                                                                                                                                       
  Downloading GeoAlchemy2-0.6.3-py2.py3-none-any.whl (21 kB)                         
Collecting pandas<0.26.0,>=0.25.3                                                                                                                                          
  Downloading pandas-0.25.3.tar.gz (12.6 MB)

Implement Box Types

For each of the box types defined in MobilityDB, a class that extends SQLAlchemy's UserDefinedType needs to be defined, similar to how we already defined temporal types like TFloat.

These include:

  • tbox
  • stbox

Check MobilityDB's documentation on Box Types: https://docs.mobilitydb.com/nightly/ch04.html

For details on how UserDefinedType is used to create new column types in SQLAlchemy, refer to: https://docs.sqlalchemy.org/en/13/core/custom_types.html#sqlalchemy.types.UserDefinedType

For an example implementation, check code for TFloat class: https://github.com/adonmo/mobilitydb-sqlalchemy/blob/master/mobilitydb_sqlalchemy/types/TFloat.py (or its base class TBaseType)

Query example documentation update

The Query example on https://mobilitydb-sqlalchemy.readthedocs.io/en/latest/quickstart.html requires the following updates, if one is using a recent set of libraries.

2,3c2
< 
< from sqlalchemy import Column, Integer
---
> from sqlalchemy import Column, Integer, create_engine
4a4,10
> from sqlalchemy.orm import sessionmaker
> from sqlalchemy.sql import func
> import datetime
> 
> engine = create_engine("postgresql://postgres:postgres@localhost:7432/mdb", echo=True)
> session = sessionmaker(bind=engine)()
> 
8c14
<     __tablename__ = "test_table_trips_01"
---
>     __tablename__ = "trips_test_001"
18c24
<     func.asText(
---
>     func.ST_asText(

TGeogPointSeq and intersection?

Does the TGeogPointSeq have an ST_Intersection function in mobilitydb-sqlalchemy?

It works when I reference it from within PostGIS/SQL or from Python using mobilitydb. However, with mobilitydb-sqlalchemy it results in:
AttributeError: Neither 'InstrumentedAttribute' object nor 'Comparator' object associated with Sched.the_traj has an attribute 'ST_Intersection'

The column is declared as a Column(TGeogPoint) and other functions (valueAtTimestamp, atPeriod) work fine.
Are there some examples that show how to do a spatial intersection/ST_Intersection on a TGeogPointSeq?

tgeogpoint?

Does mobilitydb-sqlalchemy operate on TGeogPoint? Doesn't TGeomPoint use planar geometries for calculations (distance, etc.) whereas TGeogPoint uses spherical geometries for those calculations? Does that distinction make a difference to sqlalchemy?

Thanks,
Wendell

point parameter order

In the demo, which uses TGeomPoint, the parameters are (lat, lon), but it seems that the standard order for TGeogPoint is (lon, lat). Does the code and the demo accept (lon, lat) as the parameter order when using TGeogPoint?

Implement Time Types

For each of the time types defined in MobilityDB, a class that extends SQLAlchemy's UserDefinedType needs to be defined, similar to how we already defined temporal types like TFloat.

These include:

  • period
  • timestampset
  • periodset

Check MobilityDB's documentation on Time Types: https://docs.mobilitydb.com/nightly/ch02.html

For details on how UserDefinedType is used to create new column types in SQLAlchemy, refer to: https://docs.sqlalchemy.org/en/13/core/custom_types.html#sqlalchemy.types.UserDefinedType

For an example implementation, check code for TFloat class: https://github.com/adonmo/mobilitydb-sqlalchemy/blob/master/mobilitydb_sqlalchemy/types/TFloat.py (or its base class TBaseType)

type-o

This extension looks fantastic!

In the README.rst it says "A demo webapp built using this library is not available online:". I think it should say "A demo webapp built using this library is now available online:"

Wendell

Implement Range Types

For each of the range types defined in MobilityDB, a class that extends SQLAlchemy's UserDefinedType needs to be defined, similar to how we already defined temporal types like TFloat.

These include:

  • intrange
  • floatrange

Check MobilityDB's documentation on Range Types: https://docs.mobilitydb.com/nightly/ch02.html

For details on how UserDefinedType is used to create new column types in SQLAlchemy, refer to: https://docs.sqlalchemy.org/en/13/core/custom_types.html#sqlalchemy.types.UserDefinedType

For an example implementation, check code for TFloat class: https://github.com/adonmo/mobilitydb-sqlalchemy/blob/master/mobilitydb_sqlalchemy/types/TFloat.py (or its base class TBaseType)

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.