IBM Support

Importing a polygon shapefile creates a multipolygon

Question & Answer


Question

How do I import a polygon shapefile into DB2 Spatial Extender as polygon data type? The shape import always creates the geometry type multipolygon.

Answer

If you use DB2® Spatial Extender's shape import utility to import a polygon shapefile, by default it will create multipolygon type for you. This is because the shape type information in the shapefile header does not distinguish between polygon and multipolygon. You can, however, use one of the following alternatives to import shapefile as a polygon type if the shapefile only contains simple polygons:

  • Pre-create the DB2 table in which the polygon type will be imported, then perform the shape import.
  • Specify the typeSchema and typeName parameters on the shape import utility.
  • Use the Esri® ArcSDE™ shp2sde program with flag "-e a".

[{"Product":{"code":"SSYUVL","label":"Db2 Spatial Extender for Linux, UNIX and Windows"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Import\/Export","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF027","label":"Solaris"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"9.1;9.5;9.7;10.1","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
16 June 2018

UID

swg21040652