1.added missing float4 (pg_type OID 700)
2.removed printing "..unknown type_oid .."
This commit is contained in:
parent
4d4e9f5d91
commit
7534217a8f
2 changed files with 12 additions and 8 deletions
|
@ -125,13 +125,11 @@ postgis_datasource::postgis_datasource(parameters const& params)
|
|||
int type_oid = rs->getTypeOID(i);
|
||||
switch (type_oid)
|
||||
{
|
||||
case 17285: // geometry
|
||||
desc_.add_descriptor(attribute_descriptor(fld_name,mapnik::Geometry));
|
||||
break;
|
||||
case 21: // int2
|
||||
case 23: // int4
|
||||
desc_.add_descriptor(attribute_descriptor(fld_name,mapnik::Integer,false,length));
|
||||
break;
|
||||
case 700: // float4
|
||||
case 701: // float8
|
||||
desc_.add_descriptor(attribute_descriptor(fld_name,mapnik::Double,false,length));
|
||||
case 1042: // bpchar
|
||||
|
@ -140,8 +138,9 @@ postgis_datasource::postgis_datasource(parameters const& params)
|
|||
desc_.add_descriptor(attribute_descriptor(fld_name,mapnik::String));
|
||||
break;
|
||||
default: // shouldn't get here
|
||||
#ifdef MAPNIK_DEBUG
|
||||
clog << "unknown type_oid="<<type_oid<<endl;
|
||||
desc_.add_descriptor(attribute_descriptor(fld_name,mapnik::String));
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -208,6 +207,9 @@ featureset_ptr postgis_datasource::features(const query& q) const
|
|||
s << box.minx() << " " << box.miny() << ",";
|
||||
s << box.maxx() << " " << box.maxy() << ")'::box3d,"<<srid_<<")";
|
||||
|
||||
#ifdef MAPNIK_DEBUG
|
||||
std::clog << s.str() << "\n";
|
||||
#endif
|
||||
shared_ptr<ResultSet> rs=conn->executeQuery(s.str(),1);
|
||||
return featureset_ptr(new postgis_featureset(rs,props.size()));
|
||||
}
|
||||
|
|
|
@ -85,8 +85,10 @@ feature_ptr postgis_featureset::next()
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef MAPNIK_DEBUG
|
||||
std::clog << "uknown OID = " << oid << " FIXME \n";
|
||||
boost::put(*feature,name,0);
|
||||
#endif
|
||||
//boost::put(*feature,name,0);
|
||||
}
|
||||
}
|
||||
++count_;
|
||||
|
|
Loading…
Reference in a new issue