mirror of
https://github.com/mapnik/mapnik.git
synced 2025-12-08 20:13:09 +00:00
- fixed a problem in automatic sqlite wkb format determination code
- other cosmetics in sqlite datasource
This commit is contained in:
parent
2372a60ff7
commit
020f870bb7
@ -402,7 +402,7 @@ void sqlite_datasource::bind() const
|
||||
throw datasource_exception("Sqlite Plugin: cannot detect geometry_field, please supply the name of the geometry_field to use.");
|
||||
}
|
||||
|
||||
if (index_table_.size() == 0)
|
||||
if (index_table_.empty())
|
||||
{
|
||||
// Generate implicit index_table name - need to do this after
|
||||
// we have discovered meta-data or else we don't know the column name
|
||||
@ -426,7 +426,7 @@ void sqlite_datasource::bind() const
|
||||
#endif
|
||||
}
|
||||
|
||||
if (metadata_ != "" && !extent_initialized_)
|
||||
if (metadata_ != "" && ! extent_initialized_)
|
||||
{
|
||||
std::ostringstream s;
|
||||
s << "SELECT xmin, ymin, xmax, ymax FROM " << metadata_;
|
||||
|
||||
@ -71,8 +71,7 @@ public:
|
||||
if (size > 38
|
||||
&& wkb_[0] == 0x00
|
||||
&& (wkb_[1] == 0x00 || wkb_[1] == 0x01)
|
||||
&& wkb_[38] == 0x7C
|
||||
&& wkb_[size - 1] == 0xFE)
|
||||
&& wkb_[38] == 0x7C)
|
||||
{
|
||||
format_ = wkbSpatiaLite;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user