Skip to content

Commit

Permalink
Migrate to GeoAlchemy 2
Browse files Browse the repository at this point in the history
  • Loading branch information
kalbermattenm committed May 29, 2015
1 parent f657215 commit 9a93d50
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions las_extractor/util/point_cloud_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
osgeo_loaded = False

import simplekml
from geoalchemy import WKTSpatialElement, WKBSpatialElement
from geoalchemy2 import WKTElement
from las_extractor.models import DBSession, LidarTileIndex

# Get the las file tiles intersected by the buffered profile's line
Expand All @@ -28,8 +28,8 @@ def generate_tile_list(line, bufferSizeMeter, outputDir, fileList, dataDir):
tileList = []

# Intersect the buffer with the tile index
wktsPolygon = WKTSpatialElement(str(polygon), 21781)
intersectResult = DBSession.query(LidarTileIndex).filter(LidarTileIndex.geom.intersects(wktsPolygon)).all()
wktsPolygon = WKTElement(str(polygon), 21781)
intersectResult = DBSession.query(LidarTileIndex).filter(LidarTileIndex.geom.ST_Intersects(wktsPolygon)).all()

# Read the query result and store the path to tiles files into ascii file
checkEmpty = 0
Expand Down

0 comments on commit 9a93d50

Please sign in to comment.