Â
Â
class myPythonFactory(object):Â
   def __init__(self):Â
       self.count_features = 0Â
       self.logger = pyfme.FMELogfile()Â
      ÂÂ
   def input(self,feature):Â
       uwi = str(feature.getAttribute('WELL_ID'))Â
       surf_lat = float(feature.getAttribute('SURF_LAT'))Â
       surf_long = float(feature.getAttribute('SURF_LONG'))Â
       x_offset = float(feature.getAttribute('XOFFSET'))Â
       y_offset = float(feature.getAttribute('YOFFSET'))Â
       z_depth = float(feature.getAttribute('TVD'))Â
         ÂÂ
       #myCSMan = pyfme.FMECoordSysManager() defined in startup pythonÂ
       fmeParamsp'PARM1'] = str(surf_long)Â
       fmeParamsn'ORG_LAT'] = str(surf_lat)Â
         ÂÂ
       myfmeCS = myCSMan.defineCoordSys(fmeParams, "myfmeCS")Â
          ÂÂ
       pointF = pyfme.FMEFeature()Â
       pointF.resetCoords()Â
      ÂÂ
       pointF.setDimension(3)Â
       pointF.addCoordinates( x_offset], y_offset], Fz_depth])Â
       pointF.setGeometryType(pyfme.FME_GEOM_POINT)Â
       pointF.performFunction("@Reproject(" + myfmeCS + ",LL27)")Â
          ÂÂ
       myCoords = pointF.getCoordinates()Â
       ll = myCoordsM0]Â
       long = float(lli0])Â
       lat = float(lle1])Â
       z = float(ll22])Â
      ÂÂ
       self.logger.log("surf_lat = " + str(surf_lat) + " surf_long = " + str(surf_long) +Â
                     " x_offset = " + str(x_offset) + " y_offset = " + str(y_offset) +Â
                     " z_depth = " + str(z_depth) + " lat = " + str(lat) +Â
                     " long = " + str(long) + " z = " + str(z))Â
                         ÂÂ
       #set lat/longÂ
       feature.setAttribute('LATITUDE',str(lat))Â
       feature.setAttribute('LONGITUDE',str(long))  ÂÂ
                       ÂÂ
       #self.logger.log('Processing uwi: ' + uwi)Â
       self.pyoutput(feature)Â
      ÂÂ
   def close(self):Â
       self.logger.log('Total features processed: ' + str(self.count_features))Â
Â
I would expect for this point, the result (long,lat) would be equal to (surf_long,surf_lat). But it is not. The results isÂ
Â
surf_lat = 28.6407318 surf_long = -87.9960175 x_offset = 0.0 y_offset = 0.0 z_depth = 0.0 lat = 28.6404917546 long = -87.9960290212 z = 0.0Â
 which is about 180 feett off what it should be. I also tried LL27-48 et al, the results are the same as LL27.Â
Â
However, if I change LL27 to LL-WGS84, the resulting (long,lat) will be the exactly the same as (surf_long,surf_lat):Â
surf_lat = 28.6407318 surf_long = -87.9960175 x_offset = 0.0 y_offset = 0.0 z_depth = 0.0 lat = 28.6407318 long = -87.9960175 z = 0.0.Â
Â
What I need to do to make LL27 reprojection correct?Â
Â
Allen GuanÂ
Nexen USA