Skip to content

Commit 4d698aa

Browse files
author
Stephanie Reeder
committed
merge conflicts
2 parents 2843485 + 5123278 commit 4d698aa

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

requirements.txt

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
six
22
sqlalchemy
3-
geoalchemy2
3+
geoalchemy
4+
Change line #242 in geoalchemy/base.py
5+
from:
6+
class SpatialComparator(ColumnProperty.ColumnComparator):
7+
to :
8+
class SpatialComparator(ColumnProperty.Comparator):
9+
10+
shapely
411

512
matplotlib
613
dateutils

src/api/ODM2/models.py

+5-10
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,8 @@
55
# Should not be importing anything from a specific dialect
66
# from sqlalchemy.dialects.mssql.base import BIT
77

8-
from apiCustomType import Geometry
9-
'''
10-
from sqlalchemy.ext.declarative import declarative_base
8+
# from apiCustomType import Geometry
119

12-
Base = declarative_base()
13-
metadata = Base.metadata
14-
'''
1510

1611
from geoalchemy import *
1712

@@ -563,17 +558,17 @@ class SamplingFeatures(Base):
563558
Elevation_m = Column('elevation_m', Float(53))
564559
ElevationDatumCV = Column('elevationdatumcv', ForeignKey(CVElevationDatum.Name), index=True)
565560
#FeatureGeometry = Column('featuregeometry', Geometry) # Geoalchemy 2
566-
#FeatureGeometry = GeometryColumn('featuregeometry', Point) #Geoalchemy 1, #wkb.loads(str(self.FeatureGeometry.geom_wkb)).wkt if self.FeatureGeometry is not None else None
567-
FeatureGeometry = Column('featuregeometry', BLOB)# custom geometry queries
561+
FeatureGeometry = GeometryColumn('featuregeometry', Point) #Geoalchemy 1, #wkb.loads(str(self.FeatureGeometry.geom_wkb)).wkt if self.FeatureGeometry is not None else None
562+
# FeatureGeometry = Column('featuregeometry', BLOB)# custom geometry queries
568563

569564

570565
def __repr__(self):
571566
from shapely import wkb
572567
return "<SamplingFeatures('%s', '%s', '%s', '%s', '%s')>" % (
573568
self.SamplingFeatureCode, self.SamplingFeatureName, self.SamplingFeatureDescription,
574-
self.Elevation_m, self.FeatureGeometry)
569+
self.Elevation_m, wkb.loads(str(self.FeatureGeometry.geom_wkb)).wkt if self.FeatureGeometry is not None else None)#self.FeatureGeometry)
575570

576-
#GeometryDDL(SamplingFeatures.__table__) #Geoalchemy1
571+
GeometryDDL(SamplingFeatures.__table__) #Geoalchemy1
577572

578573
class FeatureActions(Base):
579574
__tablename__ = u'featureactions'

src/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
# your project is installed. For an analysis of "install_requires" vs pip's
7676
# requirements files see:
7777
# https://packaging.python.org/en/latest/requirements.html
78-
install_requires=['pandas', 'sqlalchemy', 'pyodbc', 'pymysql', 'psycopg2'],
78+
install_requires=['pandas', 'sqlalchemy', 'geoalchemy', 'shapely'],#'pyodbc', 'pymysql', 'psycopg2',
7979

8080
# List additional groups of dependencies here (e.g. development
8181
# dependencies). You can install these using the following syntax,

0 commit comments

Comments
 (0)