update pdsql2sqlite to new feature_impl
This commit is contained in:
parent
4f48cce42e
commit
b89f5cbbbc
2 changed files with 8 additions and 3 deletions
|
@ -40,7 +40,7 @@ headers = ['#plugins/input/postgis'] + env['CPPPATH']
|
||||||
|
|
||||||
libraries = []
|
libraries = []
|
||||||
boost_program_options = 'boost_program_options%s' % env['BOOST_APPEND']
|
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']
|
linkflags = env['CUSTOM_LDFLAGS']
|
||||||
if env['SQLITE_LINKFLAGS']:
|
if env['SQLITE_LINKFLAGS']:
|
||||||
|
|
|
@ -142,8 +142,13 @@ void pgsql2sqlite(Connection conn,
|
||||||
|
|
||||||
std::string output_table_insert_sql = "insert into " + output_table_name + " values (?";
|
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)
|
for ( unsigned pos = 0; pos < num_fields ; ++pos)
|
||||||
{
|
{
|
||||||
|
const char* field_name = cursor->getFieldName(pos);
|
||||||
|
ctx->push(field_name);
|
||||||
|
|
||||||
if (pos > 0)
|
if (pos > 0)
|
||||||
{
|
{
|
||||||
create_sql << ",";
|
create_sql << ",";
|
||||||
|
@ -275,7 +280,7 @@ void pgsql2sqlite(Connection conn,
|
||||||
{
|
{
|
||||||
if (oid == geometry_oid)
|
if (oid == geometry_oid)
|
||||||
{
|
{
|
||||||
mapnik::Feature feat(pkid);
|
mapnik::Feature feat(ctx,pkid);
|
||||||
geometry_utils::from_wkb(feat.paths(),buf,size,wkbGeneric);
|
geometry_utils::from_wkb(feat.paths(),buf,size,wkbGeneric);
|
||||||
if (feat.num_geometries() > 0)
|
if (feat.num_geometries() > 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue