Creating duplicate/stacked features

381
2
Jump to solution
05-22-2014 07:56 AM
CameronBouchard
New Contributor
The situation

  • I have a set of postal code boundaries (polygons) that cover all of Canada.

  • For each polygon, i have a postal code field. The postal code shown is the ground-floor postal code.

  • For each polygon, i have a field identifying whether that shape is used by multiple postal codes (appartment buildings have many postal codes due to population). This field, called MultiPC, is boolean.


  • I also have a look-up table that has a record for each stacked postal code for those appartment buildings. The primary field is the ground floor postal code, and the 'OtherPC' field is the stacked postal code. There can be many rows with the same primary postal code, for each of the OtherPC's. The higher the population of that building, the more stacked postal codes there are.


  • The last file i have is a population table. This table has population for all of the postal codes, including the multiple codes for appartments.

I would like to have a polygon feature class that has a polygon for each postal code, even the ones that have identical geography to another. The result would be stacked polygons representing appartment buildings. With this, i could join my population and when a spatial query is done, i can get an accurate count of population. This would also allow me to search any postal code and be able to find it (rather than the current polygon file that only contains the ground floor postal code).

I cannot complete this duplication task manually, as there are 29,000 of the OtherPC's. I'm hoping there is a way to create duplicates of each polygon for each of the stacked postal codes, based on the ground floor polygon.

Does anyone have any ideas how i can achieve this?
0 Kudos
1 Solution

Accepted Solutions
RichardFairhurst
MVP Honored Contributor
if the polygons and table are in a file geodatabase and you have 10.1 or above and the two files can be joined on the ground floor postal code, then do a standard join and export the polygons to a new feature class.  The join is supposed to expand to all of the features required to make a one to many relationship turn into a one to one relationship.  I have done it, but some users have reported problems, so it may require some specific steps to work correctly.

The 10.1 help says:

"When using data where a one-to-many or many-to-many relationship exists, you should use a relate or relationship class to establish the relationship between the datasets. However, it is possible to create a join under these circumstances. When you create a join in such a case, there are differences between how tools and other layer-specific settings work depending on the data source. If you are using geodatabase data to create the join, all matching records are returned. If you are using nondatabase data, like shapefiles or dBASE tables, to create the join, only the first matching record is returned.

This means that if you have created a 1:M or M:M join with geodatabase data and you generate a report, you see multiple records in the report, one for each corresponding match. The multiple matches are also seen when using a join field while symbolizing a joined layer, labeling, identifying features, generating a graph, and using either the Find or Hyperlink tool. If you are using the joined layer as input to a geoprocessing tool or in an export operation, the multiple matching records are used."

View solution in original post

0 Kudos
2 Replies
markdenil
Occasional Contributor III
You should likely start with a composite (one to many) relationship class between your fc and your look up table.
You should be sure to add the ground floor postal code to the look up as an alternative for that building, and not just have it in its own field as primary key.
(just to be less confusing, I would give the buildings a unique ID other than one of the postal codes)

You should be able to access all the associated postal codes for a building through the relationship.

If that is not enough, and you really want multiple coincident polygons, you can use the relationship to export the features by their floor attribute: a fc of all ground floors, a fc of all first floors (second floor in the US) that have postal codes, and so forth.
Then append the separate fcs together.
0 Kudos
RichardFairhurst
MVP Honored Contributor
if the polygons and table are in a file geodatabase and you have 10.1 or above and the two files can be joined on the ground floor postal code, then do a standard join and export the polygons to a new feature class.  The join is supposed to expand to all of the features required to make a one to many relationship turn into a one to one relationship.  I have done it, but some users have reported problems, so it may require some specific steps to work correctly.

The 10.1 help says:

"When using data where a one-to-many or many-to-many relationship exists, you should use a relate or relationship class to establish the relationship between the datasets. However, it is possible to create a join under these circumstances. When you create a join in such a case, there are differences between how tools and other layer-specific settings work depending on the data source. If you are using geodatabase data to create the join, all matching records are returned. If you are using nondatabase data, like shapefiles or dBASE tables, to create the join, only the first matching record is returned.

This means that if you have created a 1:M or M:M join with geodatabase data and you generate a report, you see multiple records in the report, one for each corresponding match. The multiple matches are also seen when using a join field while symbolizing a joined layer, labeling, identifying features, generating a graph, and using either the Find or Hyperlink tool. If you are using the joined layer as input to a geoprocessing tool or in an export operation, the multiple matching records are used."
0 Kudos