[OCM CE U4] Exception when connecting to PostgreSQL

Hi,

using OpenCities Map 10.04.00.42, when I want to open PostgreSQL database, I receive this Exception:

The Property 'footprint' is null in ECInstance {gensmd_m3_cartographicmodel_data_table()}
Bentley.ECObjects.ECObjectsException+NullValue: The Property 'footprint' is null in ECInstance {gensmd_m3_cartographicmodel_data_table()}
   v Bentley.ECObjects.Instance.NullPropertyValue.get_NativeValue()
   v Bentley.EngineeringContent.Storage.Xfm.addPropertiesToFeatureDef(opaquePointer* featureDef, Boolean isRootFeature, IECNamedValueContainer propertyValueCollection, IECNameMappingEntry classMapping, ECXfmSettings settingsObject, IDictionary applicationAttributes, Boolean createCollection, Boolean includeAll, IList`1 pkNames)
   v Bentley.EngineeringContent.Storage.Xfm.ECXfmSchemaSupport.XfmFeatureDefFromInstance(IECNamedValueContainer instance, IECNameMapping nameMapping, Char* rootFeatureName, ECXfmSettings settingsObject, IDictionary applicationAttributes, Boolean createCollection, Boolean includeAll, Boolean isRoundTrippable)
   v Bentley.EngineeringContent.Storage.Xfm.ECObjectToXfmWorkingStorage.GetOrAddFeatureDefinitionFromClass(IECClass classDef, Boolean keepInSession)
   v Bentley.Geospatial.MapQuery.MapConnectionManager.CopyRISDomainClasses(IECStorage destStorage, IEnumerable`1 classes, IStorageImportCriteria storageImportCriteria)
   v Bentley.Geospatial.MapQuery.MapConnectionManager.GDIConnectionOpened(Object sender, ConnectionEventArgs eventArgs)
   v System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   v Bentley.Geospatial.DataInterchange.GeoDataInterchangeAddIn.OnConnectionOpened(IStorageImportCriteria storageImport)
   v Bentley.Geospatial.DataInterchange.GeoDataInterchangeAddIn.set_MasterFileImport(GDIImportCriteria value)
   v Bentley.Geospatial.DataInterchange.GDIExplorerConnectionsNode.AddNewNode(GDIExplorerModifyDataNode node)
   v Bentley.Geospatial.DataInterchange.GDIExplorerConnectionsNode.AddNewPostgisNode(PostgisConnectionInfo connectInfo, Boolean showNewConnectionDialog)
   v Bentley.Geospatial.DataInterchange.GDIExplorerAddIn.AddNode(Action`1 addAction)
   v Bentley.Geospatial.DataInterchange.GDIExplorerAddIn.ConnectPostgis(String unparsed)
   v Bentley.Geospatial.DataInterchange.GDIExplorerAddIn.ConnectPostgisCmd(String unparsed)

Because it's a result of some feature testing, it's not crucial, but I have two comments:

  • QGIS opens the database and displays data from this table without any issue. If I remember right AcrGIS Pro also had not any problem with the same database, but I am not able to confirm it as I have not it installed now.
  • When anything goes wrong, why exception is thrown and not user friendly message is displayed with explanation the problem.

I have to say that how connection works in OCM is beaten by both ArcGIS and QGIS completely in terms of speed, intuitive workflow and friendliness. To display data requires more typing and from time to time exceptions are thrown without any further explanation, whereas it's expected it would by just point and click and drag and drop, maybe to enter user/password credentials, but nothing more.

With regards,

  Jan

Parents Reply Children
  • Hi Martin and Elliott,

    thanks for your answers.

    The database I tested is a part of bigger project, covered by NDA. But I think one minor table would not cause any problems ;-)

    See CREATE script attached. I am aware it's not standard spatial table, but e.g. QGIS is able to analyze the table content properly and to work with all geometry data as with individual data sources.

    With regards,

      Jan

    -- Table: m3_cartographicmodel.data_table
    
    -- DROP TABLE m3_cartographicmodel.data_table;
    
    CREATE TABLE m3_cartographicmodel.data_table
    (
        graphic_symbol text COLLATE pg_catalog."default",
        geom geometry(Geometry,5514),
        graphic_geom geometry(Geometry,5514),
        reference_geom geometry(Geometry,5514),
        source_id text COLLATE pg_catalog."default",
        is_visible boolean,
        status integer,
        generalization_cost integer,
        outline_color text COLLATE pg_catalog."default",
        footprint geometry(Geometry,5514),
        priority integer,
        id integer NOT NULL DEFAULT nextval('m3_cartographicmodel.data_table_id_seq'::regclass),
        place_priority integer,
        CONSTRAINT id_pkey PRIMARY KEY (id)
    )
    WITH (
        OIDS = FALSE
    )
    TABLESPACE pg_default;
    
    ALTER TABLE m3_cartographicmodel.data_table
        OWNER to postgres;
    
    -- Index: data_table_geom_idx
    
    -- DROP INDEX m3_cartographicmodel.data_table_geom_idx;
    
    CREATE INDEX data_table_geom_idx
        ON m3_cartographicmodel.data_table USING gist
        (geom)
        TABLESPACE pg_default;
    
    -- Index: data_table_graphic_geom_idx
    
    -- DROP INDEX m3_cartographicmodel.data_table_graphic_geom_idx;
    
    CREATE INDEX data_table_graphic_geom_idx
        ON m3_cartographicmodel.data_table USING gist
        (graphic_geom)
        TABLESPACE pg_default;
    
    -- Index: data_table_place_priority_idx
    
    -- DROP INDEX m3_cartographicmodel.data_table_place_priority_idx;
    
    CREATE INDEX data_table_place_priority_idx
        ON m3_cartographicmodel.data_table USING btree
        (place_priority)
        TABLESPACE pg_default;
    
    -- Index: data_table_placesymbols_idx
    
    -- DROP INDEX m3_cartographicmodel.data_table_placesymbols_idx;
    
    CREATE INDEX data_table_placesymbols_idx
        ON m3_cartographicmodel.data_table USING btree
        (graphic_symbol COLLATE pg_catalog."default", status)
        TABLESPACE pg_default;
    
    -- Index: data_table_reference_geom_idx
    
    -- DROP INDEX m3_cartographicmodel.data_table_reference_geom_idx;
    
    CREATE INDEX data_table_reference_geom_idx
        ON m3_cartographicmodel.data_table USING gist
        (reference_geom)
        TABLESPACE pg_default;