Question

Covert tiles to geopackage?

  • 27 August 2021
  • 4 replies
  • 25 views

Badge +14
  • Contributor
  • 120 replies

I am trying to merge a set of tiles into a geopackage file. The sources have different geometries and schemas. The string transformers are beacuse the sources have (4) unique characters in the beginning that need to be removed in order to do the merging.

 

I have successfully used a similar workspace to merge tiles into shapefiles in the past. This time all is well until I try to write the new file. There are quite a few errors reported but the geist of them seems to be: "OGCGEOPACKAGE writer: No definition found for input feature type 'NNNNNN'. Ensure that fme_template_feature_type is not set incorrectly and that the feature type name is valid".

 

Any ideas on how to resolve this?

 

fme


4 replies

Userlevel 4
Badge +26

This error is coming because you are using the _filename attribute as the definition for the Schema. The problem happens because you are changing _filename in the string replacer so the attribute _filename no longer matches the Schema definition of the shapefile.

If you change the Schema Definition Name back to fme_feature_type it should work​

Badge +14

If I try using fme_feature_type to define the schema I get the following error:

OGCGEOPACKAGE writer: sqlite3_exec(CREATE TABLE "HallintoAlue" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,

 

Userlevel 4
Badge +26

If I try using fme_feature_type to define the schema I get the following error:

OGCGEOPACKAGE writer: sqlite3_exec(CREATE TABLE "HallintoAlue" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,

 

it likely has something to do with the Table Creation settings. you can expand that section out (see your screen shot above). The default primary key field is called 'id' if you have an 'id' in your data you should can try changing this setting to something like 'pid' or 'oid'.

Badge +14

it likely has something to do with the Table Creation settings. you can expand that section out (see your screen shot above). The default primary key field is called 'id' if you have an 'id' in your data you should can try changing this setting to something like 'pid' or 'oid'.

Hmm, there is no ID attribute in my data. Would this be something that is hidden somewhere?

 

Might ad that the workplace works as expected when I use a shapefile writer. The errors clearly have something to do with the geopackage writer

Reply