update pdsql2sqlite to new feature_impl

This commit is contained in:
Artem Pavlenko 2012-01-23 08:40:16 +00:00
parent 4f48cce42e
commit b89f5cbbbc
2 changed files with 8 additions and 3 deletions

View file

@ -40,7 +40,7 @@ headers = ['#plugins/input/postgis'] + env['CPPPATH']
libraries = []
boost_program_options = 'boost_program_options%s' % env['BOOST_APPEND']
libraries.extend([boost_program_options,'sqlite3','pq','mapnik'])
libraries.extend([boost_program_options,'sqlite3','pq','mapnik','icuuc'])
linkflags = env['CUSTOM_LDFLAGS']
if env['SQLITE_LINKFLAGS']:

View file

@ -142,8 +142,13 @@ void pgsql2sqlite(Connection conn,
std::string output_table_insert_sql = "insert into " + output_table_name + " values (?";
context_ptr ctx = boost::make_shared<context_type>();
for ( unsigned pos = 0; pos < num_fields ; ++pos)
{
const char* field_name = cursor->getFieldName(pos);
ctx->push(field_name);
if (pos > 0)
{
create_sql << ",";
@ -275,7 +280,7 @@ void pgsql2sqlite(Connection conn,
{
if (oid == geometry_oid)
{
mapnik::Feature feat(pkid);
mapnik::Feature feat(ctx,pkid);
geometry_utils::from_wkb(feat.paths(),buf,size,wkbGeneric);
if (feat.num_geometries() > 0)
{