Ejemplo n.º 1
0
class OSRMEdgeFrequencies(Base):
    __tablename__ = "edgefrequencies"
    edge = Column(BigInteger, ForeignKey('osrmedges.hash'), primary_key=True)
    forward = Column(Boolean, primary_key=True)
    freq = Column(BigInteger)
    geom = GeometryColumn(LineString(2), comparator=PGComparator)
    edgeobj = relationship("OSRMEdge")
Ejemplo n.º 2
0
class LightRailLine(Base, GeometryTableMixIn):
    __tablename__ = 'light_rail_line'
    __table_args__ = {
        "schema": 'foss4g',
        "autoload": True,
        "autoload_with": Session.bind
    }
    the_geom = GeometryColumn(LineString(srid=4326))
Ejemplo n.º 3
0
class Road(Base):
    __tablename__ = 'roads'

    road_id = Column(Integer, primary_key=True)
    road_name = Column(String)
    road_geom = GeometryColumn(LineString(2, srid=4326),
                               comparator=SQLiteComparator,
                               nullable=False)
Ejemplo n.º 4
0
class Road(Base):
    __tablename__ = 'roads'

    road_id = Column(Integer, primary_key=True)
    road_name = Column(Unicode(40))
    road_geom = GeometryColumn(LineString(2, srid=4326, spatial_index=False),
                               comparator=MySQLComparator,
                               nullable=False)
Ejemplo n.º 5
0
class FreeBus(Base, GeometryTableMixIn):
    __tablename__ = 'free_bus'
    __table_args__ = {
        "schema": 'foss4g',
        "autoload": True,
        "autoload_with": Session.bind
    }
    the_geom = GeometryColumn(LineString(srid=4326))
Ejemplo n.º 6
0
class Road(Base):
    __tablename__ = 'ROADS'

    road_id = Column(Integer, primary_key=True)
    road_name = Column(String(255))
    road_geom = GeometryColumn(LineString(
        2, bounding_box='(xmin=-180, ymin=-90, xmax=180, ymax=90)'),
                               comparator=MSComparator,
                               nullable=False)
Ejemplo n.º 7
0
class Track(Base):
    __tablename__ = 'tracks'

    id = Column(types.Integer, primary_key=True)
    name = Column(types.String, nullable=False)

    category_id = Column(types.Integer, ForeignKey('categories.cid'))
    categorie = relationship(Category)

    the_geom = GeometryColumn(LineString(dimension=2, srid=4326))
Ejemplo n.º 8
0
class RideTrack(Base):
    __tablename__ = "ride_tracks"
    __table_args__ = {
        "mysql_engine": "MyISAM",
        "mysql_charset": "utf8mb4",
    }  # MyISAM for spatial indexes

    ride_id = Column(BigInteger, ForeignKey("rides.id"), primary_key=True)
    gps_track = GeometryColumn(LineString(2), nullable=False)
    elevation_stream = Column(satypes.JSONEncodedText, nullable=True)
    time_stream = Column(satypes.JSONEncodedText, nullable=True)

    def __repr__(self):
        return "<{0} ride_id={1}>".format(self.__class__.__name__,
                                          self.ride_id)
Ejemplo n.º 9
0
class RideTrack(Base):
    __tablename__ = 'ride_tracks'
    __table_args__ = {
        'mysql_engine': 'MyISAM',
        'mysql_charset': 'utf8mb4'
    }  # MyISAM for spatial indexes

    ride_id = Column(BigInteger, ForeignKey('rides.id'), primary_key=True)
    gps_track = GeometryColumn(LineString(2), nullable=False)
    elevation_stream = Column(satypes.JSONEncodedText, nullable=True)
    time_stream = Column(satypes.JSONEncodedText, nullable=True)

    def __repr__(self):
        return '<{0} ride_id={1}>'.format(self.__class__.__name__,
                                          self.ride_id)
Ejemplo n.º 10
0
class Road(Base):
    __tablename__ = 'roads'

    road_id = Column(Integer, primary_key=True)
    road_name = Column(String)
    road_geom = GeometryColumn(LineString(2))
Ejemplo n.º 11
0
class Road(Base):
    __tablename__ = 'roads'
    id = Column(Integer, primary_key=True)
    name = Column(Unicode, nullable=False)
    width = Column(Integer)
    geom = GeometryColumn(LineString(2))
Ejemplo n.º 12
0
Archivo: lines.py Proyecto: fuseki/ole
class Line(Base, GeometryTableMixIn):
    __tablename__ = 'lines'
    id = Column(types.Integer, primary_key=True)
    the_geom = GeometryColumn(LineString(srid=4326))
Ejemplo n.º 13
0
class Road(Base):
    __tablename__ = 'roads'

    road_id = Column(Integer, autoincrement=True, primary_key=True)
    road_name = Column(Unicode(40))
    road_geom = GeometryColumn(LineString(2), nullable=False)
Ejemplo n.º 14
0
class OSRMEdgeGeom(Base):
    """Define a edge geometry between 2 nodes in the routing network"""
    __tablename__ = "osrmedgegeoms"
    hash = Column(BigInteger, ForeignKey("osrmedges.hash"), primary_key=True)
    geom = GeometryColumn(LineString(2), comparator=PGComparator)
    edge = relationship("OSRMEdge")