public static qGis_Object[] GetObjects(qGis_Rectangle boundary, int search_id) { SqlQueryParameter sql_left = new SqlQueryParameter("@Left", boundary.NorthWest.Longitude); SqlQueryParameter sql_right = new SqlQueryParameter("@Right", boundary.NorthEast.Longitude); SqlQueryParameter sql_top = new SqlQueryParameter("@Top", boundary.NorthEast.Latitude); SqlQueryParameter sql_bottom = new SqlQueryParameter("@Bottom", boundary.SouthWest.Latitude); qDbs_Search search = new qDbs_Search(search_id); qDbs_DataGroupConfig data_group_config = new qDbs_DataGroupConfig(search.DataGroupID); DbRow[] results = search.GetResults(schema2, string.Format("INNER JOIN qGIS_Objects ON qGIS_Objects.ReferenceID = {0}", data_group_config.KeyColumn), string.Format("qGIS_Objects.DataGroupID = {0} AND (Longitude BETWEEN @Left AND @Right) AND (Latitude BETWEEN @Bottom AND @Top)", search.DataGroupID), sql_left, sql_right, sql_top, sql_bottom); return DbRow.CreateArray<qGis_Object>(results, c => new qGis_Object(c)); }
public static qGis_Object[] GetObjects(int search_id) { qDbs_Search search = new qDbs_Search(search_id); qDbs_DataGroupConfig data_group_config = new qDbs_DataGroupConfig (search.DataGroupID); DbRow[] results = search.GetResults(schema2, string.Format("INNER JOIN qGIS_Objects ON qGIS_Objects.ReferenceID = {0}", data_group_config.KeyColumn), string.Format ("qGIS_Objects.DataGroupID = {0}", search.DataGroupID), null); return DbRow.CreateArray<qGis_Object>(results, c => new qGis_Object(c)); }