mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Update bounds srs.db in source from epsg db
This commit is contained in:
parent
149e331d2c
commit
877c0dc252
File diff suppressed because it is too large
Load Diff
@ -30,11 +30,14 @@ def gen():
|
||||
"""
|
||||
|
||||
rows = db.execute(query)
|
||||
with open("resources/epsg_areas.csv", "w") as f:
|
||||
f.write("coord_sys_code, west_bound_lon, north_bound_lat, east_bound_lon, south_bound_lat\n")
|
||||
for row in rows:
|
||||
csv = ",".join(str(data) for data in row)
|
||||
f.write('{0}\n'.format(csv))
|
||||
srsdb = sqlite.connect("./resources/srs.db")
|
||||
srsdb.execute("DELETE FROM tbl_bounds")
|
||||
data = list(rows)
|
||||
srsdb.executemany("""insert into tbl_bounds(srid, west_bound_lon,
|
||||
north_bound_lat,
|
||||
east_bound_lon,
|
||||
south_bound_lat) values (?,?,?,?,?)""", data)
|
||||
srsdb.commit()
|
||||
|
||||
|
||||
def usage():
|
||||
|
@ -1058,9 +1058,9 @@ QgsRectangle QgsCoordinateReferenceSystem::bounds() const
|
||||
return QgsRectangle();
|
||||
}
|
||||
|
||||
QString sql = QStringLiteral( "select west_bound_lon, north_bound_lat, east_bound_lon, south_bound_lat from tbl_srs "
|
||||
"where srs_id=%1" )
|
||||
.arg( d->mSrsId );
|
||||
QString sql = QStringLiteral( "select west_bound_lon, north_bound_lat, east_bound_lon, south_bound_lat from tbl_bounds "
|
||||
"where srid=%1" )
|
||||
.arg( d->mSRID );
|
||||
statement = database.prepare( sql, result );
|
||||
|
||||
QgsRectangle rect;
|
||||
|
Loading…
x
Reference in New Issue
Block a user