0

The table I am trying to recreate has these properties

Data Type      File Geodatabase Feature Class
Feature Type   Simple
Geometry Type  Polygon    <<<< WHAT I WANT TO RECREATE

My target SQL table is this:

CREATE TABLE [dbo].[MyAggregateTable](
    [OBJECTID] [int] IDENTITY(1,1) NOT NULL,
    [SHAPE] [geometry] NULL,
    [Status] [nvarchar](25) NULL,
    ...

And the resulting properties are:

Data Type      Enterprise Database Feature Class
Feature Type   Simple
Geometry type  Any         <<<< NOT THE SAME!

FURTHER PROGRESS / EDIT

Now I have discovered that I can manipulate the geometry type by using the ArcCatalog App. I can change the Type to "Polygon Features" manually on the FeatureClass properties - but it's not permanent. As soon as I exit, it 'forgets'.

Then I dicovered that if I manually "Load Data" in the ArcCatalog App, the FeatureClass properties are set, the data is loaded, and we are good to go.

However, if I flush the table, (not DROP), the geometry type reverts back.

So basically a SearchCursor / InsertCursor approach does not work >>> it has to be done manually.

3
  • SQL is a language; SQL Server is an RDBMS. If you register the table with the Enterprise geodatabase, then ArcGIS will know (because that's one of the parameters). – Vince Jul 6 '20 at 3:05
  • I hear you, but the quirks of my environment here is that I'm not "register the table with the Enterprise geodatabase". – Maxcot Jul 7 '20 at 2:26
  • 1
    Query Layers discover the geometry type by doing an initial SELECT (and if the table is empty, you must provide the geometry type). If the feature class is registered, it has a place to remember the geometry type, otherwise it must rediscover with each new connection. You can't have it both ways. – Vince Jul 7 '20 at 2:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.