Original User: RicardoMS77

Hi!

Here is my problem:

I have a shapefile with administrative sections and I have a shapefile with statistical sections. In some cases, statistical sections do not coincide with administrative sections, so I used intersect to separate the pieces of the statistical sections that were inside each administrative section.

[ATTACH=CONFIG]27950[/ATTACH] [ATTACH=CONFIG]27951[/ATTACH]

The result is statistical sections by administrative sections. The problem is that each piece of separated statistical sections have the same statistical code and the same statistical attributes. The thing is that now I want to calculate, for example, population for an administrative section, but that population is the same in the pieces of broken statistical sections, so it doubled. So, what I want to do now is to have the population of the administrative section, based on the proportion of the area of the broken statistical section.

Imagine that I have a statistical section that was separated into two pieces (50%), each to an administrative section. My population should be 50% into each of the administrative section. I need a way to do this automatically to a lot of fields and statistical characteristics and not always based on 50% and not forgetting that the population doubled in the statistical section that was cut.

I tried some phyton code, unsuccessfully.

Can anybody help me?

Thank you in advance.

Hi!

Here is my problem:

I have a shapefile with administrative sections and I have a shapefile with statistical sections. In some cases, statistical sections do not coincide with administrative sections, so I used intersect to separate the pieces of the statistical sections that were inside each administrative section.

[ATTACH=CONFIG]27950[/ATTACH] [ATTACH=CONFIG]27951[/ATTACH]

The result is statistical sections by administrative sections. The problem is that each piece of separated statistical sections have the same statistical code and the same statistical attributes. The thing is that now I want to calculate, for example, population for an administrative section, but that population is the same in the pieces of broken statistical sections, so it doubled. So, what I want to do now is to have the population of the administrative section, based on the proportion of the area of the broken statistical section.

Imagine that I have a statistical section that was separated into two pieces (50%), each to an administrative section. My population should be 50% into each of the administrative section. I need a way to do this automatically to a lot of fields and statistical characteristics and not always based on 50% and not forgetting that the population doubled in the statistical section that was cut.

I tried some phyton code, unsuccessfully.

Can anybody help me?

Thank you in advance.

You need to calculate the area of the statistical sections before you intersect it with the administrative areas.

Then calculate the new area of the intersected statistical sections.

Divide this value by the original (full polygon) area to get the percentage of original total.

Mulitply your population by the percentage to get a new population value for your subset of the statistical area's full polygon.

So, really just a series of add field and calculate field operations.

Regards,

Jim