Create QueryLayer without the use of ArcGIS.Core.Data

416
2
Jump to solution
09-15-2021 12:39 AM
TomGeo
by
Occasional Contributor III

Currently I am creating QueryLayer using ArcGIS.Core.Data functionality where I retrieve data from an Oracle database, utilizing the Database, and DatabaseConnectionProperties class etc.
It works! However, it is relatively slow, and I think it has something to do with the way the SDK connects and reads the database in question.

For simple retrieving of unique values from a database table I am not using Esri classes any more, but went with Oracle.ManagedDataAccess. It is a drastic change in response time doing so, and my "customers" love it. 

Hence, I would like to use Oracle.ManagedDataAccess to query the database, retrieve the data and use them to create a FeatureClass, and FeatureLayer.

Retrieving the data is not the problem, but creating the FeatureClass is.
Currently I am creating the FeatureClass through the OpenTable method of the ArcGIS.Core.Data Database class. That means I am back to square one, because I have to establish the connection through the AGP SDK.

Is there a way to use Oracle.ManagedDataAccess to create QueryLayer?

-------------------------
“GIS is a form of digital mapping technology. Kind of like Google Earth, but better.” ~ Arnold Schwarzenegger
0 Kudos
1 Solution

Accepted Solutions
RichRuh
Esri Regular Contributor

Thomas-

There's no way to directly create a FeatureClass/FeatureLayer from a data structure returned from an Oracle API.

Some ideas:

  • Create a plugin datasource that reads from the Oracle.ManagedDataAccess. Plugin datasources are described here. The resulting feature class is read-only.
  • Copy the data into a memory geodatabase. This is read-write, but of course any changes you make are to the memory database, not the Oracle tables.

I hope this helps.

--Rich

 

View solution in original post

0 Kudos
2 Replies
RichRuh
Esri Regular Contributor

Thomas-

There's no way to directly create a FeatureClass/FeatureLayer from a data structure returned from an Oracle API.

Some ideas:

  • Create a plugin datasource that reads from the Oracle.ManagedDataAccess. Plugin datasources are described here. The resulting feature class is read-only.
  • Copy the data into a memory geodatabase. This is read-write, but of course any changes you make are to the memory database, not the Oracle tables.

I hope this helps.

--Rich

 

0 Kudos
TomGeo
by
Occasional Contributor III

Thanks Rich,

I will try the plugin datasource way.

-------------------------
“GIS is a form of digital mapping technology. Kind of like Google Earth, but better.” ~ Arnold Schwarzenegger
0 Kudos