Skip to content

add ability to specify via PROJ.4 #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions fio_area/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,14 @@ def findExtrema(features):


def addArea(feature, calc_crs):
if calc_crs is None:
eCode = getZone(findExtrema(feature))
if calc_crs[0] == '+':
ecode = calc_crs
elif calc_crs is None:
{'init': getZone(findExtrema(feature))}
else:
eCode = calc_crs
ecode = {'init': calc_crs}

area = projectShapes(feature, {'init': eCode}).area
area = projectShapes(feature, ecode).area

return area

Expand All @@ -67,4 +69,3 @@ def _poly_filter(features):
for f in features:
if f['geometry']['type'] == 'MultiPolygon' or f['geometry']['type'] == 'Polygon':
yield f