erpas/rgis

XSBuilder: check if a table exist before querying it

Closed this issue · 1 comments

erpas commented

Some methods of ras_gis_import.XSBuilder do a query on tables without checking if he table exists, i.e:
def get_nvalues(self, xs_id):
qry = 'SELECT "Fraction", "N_Value" FROM "{0}"."Manning" WHERE "XsecID" = {1};'

If a user decided to create the SDF without defining the n_values it will result in a Programming Error.
Despite the error, RiverGIS creates a proper SDF, tough.
Would be nice to first check if the object is registered in the database.

Checking object existence during exporting to SDF file added.