Skip to content

Commit

Permalink
Merge pull request #659 from gisce/bugfix/60401_transform_coords_A3_f…
Browse files Browse the repository at this point in the history
…us_30

FIX valores coordenadas X e Y transformadas a SRID 25830
  • Loading branch information
ecarreras authored Jul 9, 2024
2 parents 7562794 + 559cb9c commit 33a8a91
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions libcnmc/cir_8_2021/FA3.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from libcnmc.core import StopMultiprocessBased
from libcnmc.utils import format_f, convert_srid, get_srid, get_ine
from datetime import datetime
from shapely import wkt
import traceback


Expand Down Expand Up @@ -57,13 +56,10 @@ def consumer(self):
o_tipo_crecimiento = prevision['tipo_crecimiento']

# COORDENADAS
o_x = ''
if prevision.get('x', False):
o_x = prevision['x']

o_y = ''
if prevision.get('y', False):
o_y = prevision['y']
res_srid = ['', '']
vertex = [prevision.get('x', 0.0), prevision.get('y', 0.0)]
if vertex:
res_srid = convert_srid(get_srid(O), vertex)

# SUPERFÍCIE
o_superficie = ''
Expand Down Expand Up @@ -110,9 +106,9 @@ def consumer(self):
self.output_q.put([
o_cod_crecimiento, # CÓDIGO CRECIMIENTO
o_tipo_crecimiento, # TIPO CRECIMIENTO
format_f(o_x, decimals=3), # COORDENADA X
format_f(o_y, decimals=3), # COORDENADA Y
'0,000', # COORDENADA Z
format_f(res_srid[0], decimals=3), # COORDENADA X
format_f(res_srid[1], decimals=3), # COORDENADA Y
'0,000', # COORDENADA Z
format_f(o_superficie, decimals=3), # SUPERFICIE
o_uso, # USO
format_f(o_potencia_solicitada, decimals=3), # POTENCIA SOLICITADA
Expand Down

0 comments on commit 33a8a91

Please sign in to comment.