Select to view content in your preferred language

Subset of Data to UN

162
2
Jump to solution
Monday
Joshua_Moreno
Emerging Contributor

Hello, I have data in an asset package but want to test a prototype UN by applying the asset package to a mobile gdb but I would like to only deploy a subset of my data such as one subnetwork/circuit from the substation and the other devices/structures connected to that circuit for testing purposes.

Goal is to be able to test run this circuit before moving forward with doing all the data.

Thank you

0 Kudos
1 Solution

Accepted Solutions
MobiusSnake
MVP Regular Contributor

I did something like this a couple years ago, I'm not sure if this is best practice, but here's how I did it (this is off the top of my head, I don't have the script handy, may be forgetting or misremembering a bit):

  • I identified a subnetwork that had minimal geographical overlap with other subnetworks.  I didn't use any UN/AP attribution for this, it was a rural area that I knew (from the business) that was mostly on one circuit.
  • I created a new polygon feature class with one feature, a manually digitized polygon to encompass this area.
  • I wrote a Python script that used the polygon feature class to do the following:
    • For each of the domain/structure classes in the AP, delete anything outside the polygon
    • Use a Python set and a series of search cursors to compile all Global IDs that remained (this also included the tables for non-spatial objects)
    • Open an update cursor on the C_Associations table and delete anything that had a "to global id" or "from global id" that was missing from the Global IDs set
  • Build the AP
  • I added two subnetwork controllers for the subnetwork manually after the build, rather than use the C* table for those

This did result in some leftover nearby features that were parts of other subnetworks, but it didn't really matter for what I was trying to do (identifying the most common errors to refine the ETL process, determining whether there were rules missing I needed to add, picking up ETL omissions like missing J:J associations, etc.)  I reused this process a few times as I made further changes to the ETL process, sometimes for the same region I used the first run, and sometimes for different regions.

View solution in original post

2 Replies
MobiusSnake
MVP Regular Contributor

I did something like this a couple years ago, I'm not sure if this is best practice, but here's how I did it (this is off the top of my head, I don't have the script handy, may be forgetting or misremembering a bit):

  • I identified a subnetwork that had minimal geographical overlap with other subnetworks.  I didn't use any UN/AP attribution for this, it was a rural area that I knew (from the business) that was mostly on one circuit.
  • I created a new polygon feature class with one feature, a manually digitized polygon to encompass this area.
  • I wrote a Python script that used the polygon feature class to do the following:
    • For each of the domain/structure classes in the AP, delete anything outside the polygon
    • Use a Python set and a series of search cursors to compile all Global IDs that remained (this also included the tables for non-spatial objects)
    • Open an update cursor on the C_Associations table and delete anything that had a "to global id" or "from global id" that was missing from the Global IDs set
  • Build the AP
  • I added two subnetwork controllers for the subnetwork manually after the build, rather than use the C* table for those

This did result in some leftover nearby features that were parts of other subnetworks, but it didn't really matter for what I was trying to do (identifying the most common errors to refine the ETL process, determining whether there were rules missing I needed to add, picking up ETL omissions like missing J:J associations, etc.)  I reused this process a few times as I made further changes to the ETL process, sometimes for the same region I used the first run, and sometimes for different regions.

JohnAlsup
Esri Regular Contributor

You can also provide an extent to the Apply Asset Package to Geodatabase.  You will probably get some incomplete subnetworks.

JohnAlsup_1-1760444214109.png

 

 

John Alsup
jalsup@esri.com