Beispiel #1
0
        public override FeatureList process(Feature input, FilterEnv env)
        {
            FeatureList output = new FeatureList();

            if (transform != null && !transform.Identity())
            {
                foreach (GeoShape shape in input.getShapes())
                {
                    XformVisitor visitor = new XformVisitor();
                    visitor.trans = transform;
                    shape.accept(visitor);
                }
            }

            output.Add(input);
            return(output);

#if TODO
            // resolve the xlate shortcut
            Matrix working_matrix = xform_matrix;

            // TODO: this can go into process(FeatureList) instead of running for every feature..
            if (getTranslateScript() != null)
            {
                ScriptResult r = env.getScriptEngine().run(getTranslateScript(), input, env);
                if (r.isValid())
                {
                    working_matrix = Matrix.translate(r.asVec3());
                }
                else
                {
                    env.getReport().error(r.asString());
                }
            }

            if (working_srs != null || (working_matrix != null && !working_matrix.IsIdentity))
            {
                foreach (GeoShape shape in input.getShapes())
                {
                    if (working_matrix != null && !working_matrix.IsIdentity)
                    {
                        XformVisitor visitor;
                        visitor.mat = working_matrix;
                        shape.accept(visitor);
                    }

                    if (working_srs != null && !working_srs.equivalentTo(env.getInputSRS()))
                    {
                        working_srs.transformInPlace(shape);
                    }
                }
            }

            output.Add(input);
            return(output);
#endif
            throw new NotImplementedException();
        }
Beispiel #2
0
        public override FeatureList process(FeatureList input, FilterEnv env)
        {
            FeatureList output = new FeatureList();

            //Boolean encontrado = false;
            SharpMap.Geometries.BoundingBox boundingBox = new SharpMap.Geometries.BoundingBox(longitudeMin, latitudeMin, longitudeMax, latitudeMax);

            foreach (Feature feature in input)
            {
                //if type of features is Point
                if (feature.row.Geometry is SharpMap.Geometries.Point)
                {
                    SharpMap.Geometries.Point p = (SharpMap.Geometries.Point)feature.row.Geometry;
                    if (boundingBox.Contains(p.GetBoundingBox()))
                    {
                        output.Add(feature);
                    }
                }
                //if type of features is Polygon
                else if (feature.row.Geometry is SharpMap.Geometries.Polygon)
                {
                    SharpMap.Geometries.Polygon polygon = (SharpMap.Geometries.Polygon)feature.row.Geometry;
                    if (boundingBox.Contains(polygon.GetBoundingBox()))
                    {
                        output.Add(feature);
                    }
                }
                //if type of features is MultiPolygon
                else if (feature.row.Geometry is SharpMap.Geometries.MultiPolygon)
                {
                    SharpMap.Geometries.MultiPolygon mp = (SharpMap.Geometries.MultiPolygon)feature.row.Geometry;
                    SharpMap.Geometries.BoundingBox  bb = mp.GetBoundingBox();
                    if (boundingBox.Contains(bb))
                    {
                        output.Add(feature);
                    }
                }
            }

            if (successor != null)
            {
                if (successor is FeatureFilter)
                {
                    FeatureFilter filter = (FeatureFilter)successor;
                    FeatureList   l      = filter.process(output, env);
                }
                else if (successor is FragmentFilter)
                {
                    FragmentFilter filter = (FragmentFilter)successor;
                    FragmentList   l      = filter.process(output, env);
                }
            }

            return(output);
        }
Beispiel #3
0
        /**
         * Processes a single Feature.
         *
         * @param input
         *      Individual Feature to process.
         * @param env
         *      Runtime processing environment.
         * @return
         *      A collection of Feature instances. The default implementation
         *      of this method just returns the input in a list.
         */
        public virtual FeatureList process(Feature input, FilterEnv env)
        {
            FeatureList output = new FeatureList();

            output.Add(input);
            return(output);
        }
Beispiel #4
0
        public FeatureList Convert(ResolutionContext context)
        {
            List <FeatureDto> list      = context.SourceValue as List <FeatureDto>;
            FeatureList       namedlist = new FeatureList();

            foreach (FeatureDto v in list)
            {
                namedlist.Add(Mapper.Map <Feature> (v));
            }
            return(namedlist);
        }
Beispiel #5
0
        public static FeatureList DataTableToList(FeatureDataTable table)
        {
            FeatureList list = new FeatureList();

            foreach (FeatureDataRow row in table)
            {
                Feature f = new Feature();
                f.setFeature(row);
                list.Add(f);
            }

            return(list);
        }
Beispiel #6
0
        /// <summary>
        /// 根据ShpReader和DbfReader创建FeatureSet
        /// </summary>
        /// <param name="shpReader"></param>
        /// <param name="dbfReader"></param>
        /// <param name="recordNum"></param>
        /// <returns></returns>
        private static FeatureSet CreateFeatureSet(ShpReader shpReader, DbfReader dbfReader, int recordNum)
        {
            GeometryType geometryType = (GeometryType)shpReader.ShpHeader.ShapeType;
            var          featureType  = ShpUtil
                                        .GeometryType2FeatureType(geometryType);
            FeatureSet   fs       = new FeatureSet(featureType);
            IFeatureList features = new FeatureList(fs);

            for (int i = 0; i < recordNum; i++)
            {
                var spatialBytes = shpReader.GetNextRecord();
                dbfReader.GetNextRow();
                IGeometry geometry;
                switch (geometryType)
                {
                case GeometryType.Point:
                    geometry = BytesToGeometry.CreatePoint(spatialBytes);
                    break;

                case GeometryType.MultiPoint:
                    geometry = BytesToGeometry.CreateMultipoint(spatialBytes);
                    break;

                case GeometryType.PolyLine:
                    geometry = BytesToGeometry.CreatePolyLine(spatialBytes);
                    break;

                case GeometryType.Polygon:
                    geometry = BytesToGeometry.CreatePolygon(spatialBytes);
                    break;

                default:
                    geometry = null;
                    break;
                }

                IFeature feature = new Feature(geometry);
                features.Add(feature);
            }

            fs.Features.Set(features);
            fs.AttrTable = dbfReader.DbfTable;
            var header = shpReader.ShpHeader;

            //fs.Envelope = new Envelope(header.XMin, header.YMin,
            //    header.XMax, header.YMax,
            //    header.ZMin, header.ZMax);

            return(fs);
        }
        public override FeatureList process(FeatureList input, FilterEnv env)
        {
            FeatureList output = new FeatureList();

            foreach (Feature feature in input)
            {
                //engine.run(script, feature, null);
                if (feature.row[attributeName].ToString().ToLowerInvariant() == attributeValue)
                {
                    output.Add(feature);
                }
            }
            return(output);
        }
Beispiel #8
0
        public Main()
        {
            _quoteDictionary = new Dictionary <string, Quote>();
            FeatureList.Add(FeaturesT.SUPPORTS_REALTIME_OPTIONS_CHAIN);
            FeatureList.Add(FeaturesT.SUPPORTS_REALTIME_STOCK_QUOTE);
            FeatureList.Add(FeaturesT.SUPPORTS_STOCK_HISTORICAL_DATA);
            FeatureList.Add(FeaturesT.SUPPORTS_OPTIONS_HISTORICAL_DATA);
            FeatureList.Add(FeaturesT.SUPPORTS_HISTORICAL_VOLATILITY);
            FeatureList.Add(FeaturesT.SUPPORTS_INTEREST_RATE);

            // update server list
            ServerList.Add(Name);
            _B3Poviderconfig = new B3ProviderConfig();
            _B3PoviderClient = new B3ProviderClient(_B3Poviderconfig);
        }
Beispiel #9
0
 private void LoadFeatureList()
 {
     if (FeatureList.Count == 0)
     {
         var section = (FeatureListConfigHandler)ConfigurationManager.GetSection("FeatureList");
         if (section != null)
         {
             foreach (FeatureElement featureItem in section.FeatureItems)
             {
                 if (!FeatureList.ContainsKey(featureItem.Name))
                 {
                     FeatureList.Add(featureItem.Name, featureItem.IsEnabled);
                 }
             }
         }
     }
 }
Beispiel #10
0
        override public FeatureList process(Feature input, FilterEnv env)
        {
            FeatureList output = new FeatureList();

            //resolve the xlate shortcut
            Mogre.Matrix4 workingMatrix = Matrix;

            //TODO: this can go into process (FeatureList) instead of running for every feature..
            if (TranslateScript != null)
            {
                ScriptResult r = env.getScriptEngine().run(TranslateScript, input, env);
                if (r.isValid())
                {
                    workingMatrix.MakeTrans(new Mogre.Vector3((float)r.asVec3().x, (float)r.asVec3().y, (float)r.asVec3().z));
                }
                else
                {
                    env.getReport().error(r.asString());
                }
            }
            if (workingSrs != null || (workingMatrix != null && workingMatrix != Mogre.Matrix4.IDENTITY))
            {
                //TODO foreach (Geometry shape in input.getGeometry())
                //{
                //    if (workingMatrix != null && !workingMatrix.Equals(Mogre.Matrix4.IDENTITY))
                //    {

                //        XformVisitor visitor = new XformVisitor();
                //        visitor.mat = workingMatrix;
                //        shape.accept(visitor);
                //    }
                //    if (workingSrs != null && !(workingSrs.equivalentTo(env.getInputSRS())))
                //    {
                //        workingSrs.transformInPlace(shape);
                //    }
                //}
                if (workingSrs != null && !(workingSrs.equivalentTo(env.getInputSRS())))
                {
                    Geometry temp = GeometryTransform.TransformGeometry(input.getGeometry(), ((SharpMapSpatialReference)workingSrs).MathTransform);
                    input.setGeometry(temp);
                    //workingSrs.transformInPlace(input.getGeometry());
                }
            }
            output.Add(input);
            return(output);
        }
Beispiel #11
0
        public override FeatureList process(FeatureList input, FilterEnv env)
        {
            FeatureList output = new FeatureList();

            //Boolean encontrado = false;
            SharpMap.Geometries.BoundingBox boundingBox = new SharpMap.Geometries.BoundingBox(longitudeMin,latitudeMin,longitudeMax,latitudeMax);

            foreach (Feature feature in input)
            {
                //if type of features is Point
                if (feature.row.Geometry is SharpMap.Geometries.Point)
                {
                    SharpMap.Geometries.Point p = (SharpMap.Geometries.Point)feature.row.Geometry;
                    if (boundingBox.Contains(p.GetBoundingBox()))
                    {
                        output.Add(feature);
                    }
                }
                //if type of features is Polygon
                else if (feature.row.Geometry is SharpMap.Geometries.Polygon)
                {
                    SharpMap.Geometries.Polygon polygon = (SharpMap.Geometries.Polygon)feature.row.Geometry;
                    if (boundingBox.Contains(polygon.GetBoundingBox()))
                    {
                        output.Add(feature);
                    }
                }
                //if type of features is MultiPolygon
                else if (feature.row.Geometry is SharpMap.Geometries.MultiPolygon)
                {
                    SharpMap.Geometries.MultiPolygon mp = (SharpMap.Geometries.MultiPolygon)feature.row.Geometry;
                    SharpMap.Geometries.BoundingBox bb = mp.GetBoundingBox();
                    if (boundingBox.Contains(bb))
                    {
                        output.Add(feature);
                    }
                }

            }

            if (successor != null)
            {
                if (successor is FeatureFilter)
                {
                    FeatureFilter filter = (FeatureFilter)successor;
                    FeatureList l = filter.process(output, env);
                }
                else if (successor is FragmentFilter)
                {
                    FragmentFilter filter = (FragmentFilter)successor;
                    FragmentList l = filter.process(output, env);
                }
            }

            return output;
        }
        override public FeatureList process(Feature input, FilterEnv env)
        {
            FeatureList output = new FeatureList();

            //resolve the xlate shortcut
            Mogre.Matrix4 workingMatrix = Matrix;

            //TODO: this can go into process (FeatureList) instead of running for every feature..
            if (TranslateScript != null)
            {
                ScriptResult r = env.getScriptEngine().run(TranslateScript, input, env);
                if (r.isValid())
                {
                    workingMatrix.MakeTrans(new Mogre.Vector3((float)r.asVec3().x, (float)r.asVec3().y, (float)r.asVec3().z));
                }
                else
                {
                    env.getReport().error(r.asString());
                }
            }
            if (workingSrs != null || (workingMatrix != null && workingMatrix != Mogre.Matrix4.IDENTITY))
            {
                //TODO foreach (Geometry shape in input.getGeometry())
                //{
                //    if (workingMatrix != null && !workingMatrix.Equals(Mogre.Matrix4.IDENTITY))
                //    {

                //        XformVisitor visitor = new XformVisitor();
                //        visitor.mat = workingMatrix;
                //        shape.accept(visitor);
                //    }
                //    if (workingSrs != null && !(workingSrs.equivalentTo(env.getInputSRS())))
                //    {
                //        workingSrs.transformInPlace(shape);
                //    }
                //}
                if (workingSrs != null && !(workingSrs.equivalentTo(env.getInputSRS())))
                {
                   Geometry temp =  GeometryTransform.TransformGeometry(input.getGeometry(), ((SharpMapSpatialReference)workingSrs).MathTransform);
                   input.setGeometry(temp);
                   //workingSrs.transformInPlace(input.getGeometry());
                }
            }
            output.Add(input);
            return output;
        }
Beispiel #13
0
 public void AddFeature(Feature feature)
 {
     FeatureList.Add(feature);
 }
Beispiel #14
0
        public override FeatureList process(FeatureList input, FilterEnv env)
        {
            FeatureList output = new FeatureList();

            // HACER ALGO DEL ESTILO:

            if (transform == null)
            {
                //Create zone UTM 32N projection
                IProjectedCoordinateSystem utmProj = CreateUtmProjection(32);

                //Create geographic coordinate system (lets just reuse the CS from the projection)
                IGeographicCoordinateSystem geoCS = utmProj.GeographicCoordinateSystem;

                //Create transformation
                CoordinateTransformationFactory ctFac = new CoordinateTransformationFactory();

                // TODO DANI Mirar de donde viene este source y target
                ICoordinateTransformation Coordinatetransform = null;// TODO = ctFac.CreateFromCoordinateSystems(source, target);

                //cs
                string wkt = "GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.0174532925199433]]";
                //ICoordinateSystem cs = SharpMap.Converters.WellKnownText.CoordinateSystemWktReader.Parse(wkt) as ICoordinateSystem;
                ICoordinateSystem cs = ProjNet.Converters.WellKnownText.CoordinateSystemWktReader.Parse(wkt) as ICoordinateSystem;
                //wgs84
                GeographicCoordinateSystem wgs84 = GeographicCoordinateSystem.WGS84;

                //gcs
                CoordinateSystemFactory cFac = new ProjNet.CoordinateSystems.CoordinateSystemFactory();
                //CoordinateSystemFactory cFac = new SharpMap.CoordinateSystems.CoordinateSystemFactory();
                //Create Bessel 1840 geographic coordinate system
                IEllipsoid                  ellipsoid = cFac.CreateFlattenedSphere("Bessel 1840", 6377397.155, 299.15281, LinearUnit.Metre);
                IHorizontalDatum            datum     = cFac.CreateHorizontalDatum("Bessel 1840", DatumType.HD_Geocentric, ellipsoid, null);
                IGeographicCoordinateSystem gcs       = cFac.CreateGeographicCoordinateSystem("Bessel 1840", AngularUnit.Degrees, datum,
                                                                                              PrimeMeridian.Greenwich, new AxisInfo("Lon", AxisOrientationEnum.East),
                                                                                              new AxisInfo("Lat", AxisOrientationEnum.North));

                //coordsys
                //Collection<ProjectionParameter> parameters = new Collection<ProjectionParameter>(5);
                List <ProjectionParameter> parameters = new List <ProjectionParameter>();
                parameters.Add(new ProjectionParameter("latitude_of_origin", 0));
                parameters.Add(new ProjectionParameter("central_meridian", 110));
                parameters.Add(new ProjectionParameter("scale_factor", 0.997));
                parameters.Add(new ProjectionParameter("false_easting", 3900000));
                parameters.Add(new ProjectionParameter("false_northing", 900000));
                IProjection projection = cFac.CreateProjection("Mercator_1SP", "Mercator_1SP", parameters);
                IProjectedCoordinateSystem coordsys =
                    cFac.CreateProjectedCoordinateSystem("Makassar / NEIEZ", gcs, projection, LinearUnit.Metre,
                                                         new AxisInfo("East", AxisOrientationEnum.East),
                                                         new AxisInfo("North", AxisOrientationEnum.North));

                Coordinatetransform = ctFac.CreateFromCoordinateSystems(gcs, coordsys);//gcsWGS84 -> gcenCsWGS84

                //Apply transformation
                transform = Coordinatetransform.MathTransform;
            }

            SharpMap.Geometries.Point p = new SharpMap.Geometries.Point(30.0, 20.0);

            p = GeometryTransform.TransformPoint(p, transform);

/*IMPORTANTE
*           foreach (Feature feature in input)
*           {
*               feature.row.Geometry = GeometryTransform.TransformGeometry(feature.row.Geometry, transform);
*               //feature.row.Geometry = GeometryTransform.TransformMultiPolygon(feature.row.Geometry, transform);
*           }
*  IMPORTANTE*/
            foreach (Feature f in input)
            {
                output.Add(f);//output = input
            }

            // Cosas a cambiar:
            // Primero, la construccion del transform está siguiendo el ejemplo, pero hay que tener en cuenta los datos del xml y construirlo en consecuencia
            // Segundo, el filtro debe retornar una NUEVA lista, y no modificar la inicial. Ahora modifica los valores de la lista inicial
            // IMPORTANTE RETORNAR NUEVA LISTA OUTPUT <----------- FALTA POR HACER
#if TODO
            // first time through, establish a working SRS for output data.
            if (working_srs == null)
            {
                // first try to use the terrain SRS if so directed:
                SpatialReference new_out_srs = getUseTerrainSRS() ? env.getTerrainSRS() : null;
                if (new_out_srs == null)
                {
                    // failing that, see if we have an SRS in a resource:
                    if (getSRS() == null && getSRSScript() != null)
                    {
                        ScriptResult r = env.getScriptEngine().run(getSRSScript(), env);
                        if (r.isValid())
                        {
                            setSRS(env.getSession().getResources().getSRS(r.ToString()));
                        }
                        else
                        {
                            env.getReport().error(r.ToString());
                        }
                    }

                    new_out_srs = srs;
                }

                // set the "working" SRS that will be used for all features passing though this filter:
                working_srs = new_out_srs != null ? new_out_srs : env.getInputSRS();

                // LOCALIZE points around a local origin (the working extent's centroid)
                if (working_srs != null && getLocalize()) //&& env.getExtent().getArea() > 0.0 )
                {
                    if (env.getCellExtent().getSRS().isGeographic() && env.getCellExtent().getWidth() > 179.0)
                    {
                        //NOP - no localization for big geog extent ... needs more thought perhaps
                    }
                    else
                    {
                        GeoPoint centroid0 = new_out_srs != null?
                                             new_out_srs.transform(env.getCellExtent().getCentroid()) :
                                                 env.getCellExtent().getCentroid();

                        // we do want the localizer point on the surface if possible:
                        GeoPoint centroid = clampToTerrain(centroid0, env);
                        if (centroid == null)
                        {
                            centroid = centroid0;
                        }

                        Matrixd localizer;

                        // For geocentric datasets, we need a special localizer matrix:
                        if (working_srs.isGeocentric())
                        {
                            localizer = working_srs.getEllipsoid().createGeocentricInvRefFrame(centroid);
                            localizer.invert(localizer);
                        }

                        // For projected datasets, just a simple translation:
                        else
                        {
                            localizer = osg.Matrixd.translate(-centroid);
                        }

                        working_srs = working_srs.cloneWithNewReferenceFrame(localizer);
                    }
                }
            }

            // we have to assign the output SRS on each pass
            if (working_srs != null)
            {
                env.setOutputSRS(working_srs);
            }

            return(base.process(input, env));
#endif
            //throw new NotImplementedException();

            if (successor != null)
            {
                if (successor is FeatureFilter)
                {
                    FeatureFilter filter = (FeatureFilter)successor;
                    FeatureList   l      = filter.process(output, env);
                }
                else if (successor is FragmentFilter)
                {
                    FragmentFilter filter = (FragmentFilter)successor;
                    FragmentList   l      = filter.process(output, env);
                }
            }

            return(output);
        }
 /**
  * Processes a single Feature.
  *
  * @param input
  *      Individual Feature to process.
  * @param env
  *      Runtime processing environment.
  * @return
  *      A collection of Feature instances. The default implementation
  *      of this method just returns the input in a list.
  */
 public virtual FeatureList process(Feature input, FilterEnv env)
 {
     FeatureList output = new FeatureList();
     output.Add(input);
     return output;
 }
        public override FeatureList process(FeatureList input, FilterEnv env)
        {
            FeatureList output = new FeatureList();

            // HACER ALGO DEL ESTILO:

            if (transform == null)
            {
                //Create zone UTM 32N projection
                IProjectedCoordinateSystem utmProj = CreateUtmProjection(32);

                //Create geographic coordinate system (lets just reuse the CS from the projection)
                IGeographicCoordinateSystem geoCS = utmProj.GeographicCoordinateSystem;

                //Create transformation
                CoordinateTransformationFactory ctFac = new CoordinateTransformationFactory();

                // TODO DANI Mirar de donde viene este source y target
                ICoordinateTransformation Coordinatetransform = null;// TODO = ctFac.CreateFromCoordinateSystems(source, target);

                //cs
                string wkt = "GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.0174532925199433]]";
                //ICoordinateSystem cs = SharpMap.Converters.WellKnownText.CoordinateSystemWktReader.Parse(wkt) as ICoordinateSystem;
                ICoordinateSystem cs = ProjNet.Converters.WellKnownText.CoordinateSystemWktReader.Parse(wkt) as ICoordinateSystem;
                //wgs84
                GeographicCoordinateSystem wgs84 = GeographicCoordinateSystem.WGS84;

                //gcs
                CoordinateSystemFactory cFac = new ProjNet.CoordinateSystems.CoordinateSystemFactory();
                //CoordinateSystemFactory cFac = new SharpMap.CoordinateSystems.CoordinateSystemFactory();
                //Create Bessel 1840 geographic coordinate system
                IEllipsoid ellipsoid = cFac.CreateFlattenedSphere("Bessel 1840", 6377397.155, 299.15281, LinearUnit.Metre);
                IHorizontalDatum datum = cFac.CreateHorizontalDatum("Bessel 1840", DatumType.HD_Geocentric, ellipsoid, null);
                IGeographicCoordinateSystem gcs = cFac.CreateGeographicCoordinateSystem("Bessel 1840", AngularUnit.Degrees, datum,
                    PrimeMeridian.Greenwich, new AxisInfo("Lon", AxisOrientationEnum.East),
                    new AxisInfo("Lat", AxisOrientationEnum.North));

                //coordsys
                //Collection<ProjectionParameter> parameters = new Collection<ProjectionParameter>(5);
                List<ProjectionParameter> parameters = new List<ProjectionParameter>();
                parameters.Add(new ProjectionParameter("latitude_of_origin", 0));
                parameters.Add(new ProjectionParameter("central_meridian", 110));
                parameters.Add(new ProjectionParameter("scale_factor", 0.997));
                parameters.Add(new ProjectionParameter("false_easting", 3900000));
                parameters.Add(new ProjectionParameter("false_northing", 900000));
                IProjection projection = cFac.CreateProjection("Mercator_1SP", "Mercator_1SP", parameters);
                IProjectedCoordinateSystem coordsys =
               cFac.CreateProjectedCoordinateSystem("Makassar / NEIEZ", gcs, projection, LinearUnit.Metre,
                                                    new AxisInfo("East", AxisOrientationEnum.East),
                                                    new AxisInfo("North", AxisOrientationEnum.North));

                Coordinatetransform = ctFac.CreateFromCoordinateSystems(gcs, coordsys);//gcsWGS84 -> gcenCsWGS84

                //Apply transformation
                transform = Coordinatetransform.MathTransform;

            }

            SharpMap.Geometries.Point p = new SharpMap.Geometries.Point(30.0, 20.0);

            p = GeometryTransform.TransformPoint(p,transform);
/*IMPORTANTE
            foreach (Feature feature in input)
            {
                feature.row.Geometry = GeometryTransform.TransformGeometry(feature.row.Geometry, transform);
                //feature.row.Geometry = GeometryTransform.TransformMultiPolygon(feature.row.Geometry, transform);
            }
IMPORTANTE*/
            foreach (Feature f in input)
            {
                output.Add(f);//output = input
            }

            // Cosas a cambiar:
            // Primero, la construccion del transform está siguiendo el ejemplo, pero hay que tener en cuenta los datos del xml y construirlo en consecuencia
            // Segundo, el filtro debe retornar una NUEVA lista, y no modificar la inicial. Ahora modifica los valores de la lista inicial
            // IMPORTANTE RETORNAR NUEVA LISTA OUTPUT <----------- FALTA POR HACER
#if TODO
            // first time through, establish a working SRS for output data.
            if (working_srs == null)
            {
                // first try to use the terrain SRS if so directed:
                SpatialReference new_out_srs = getUseTerrainSRS() ? env.getTerrainSRS() : null;
                if (new_out_srs == null)
                {
                    // failing that, see if we have an SRS in a resource:
                    if (getSRS() == null && getSRSScript() != null)
                    {
                        ScriptResult r = env.getScriptEngine().run(getSRSScript(), env);
                        if (r.isValid())
                            setSRS(env.getSession().getResources().getSRS(r.ToString()));
                        else
                            env.getReport().error(r.ToString());
                    }

                    new_out_srs = srs;
                }

                // set the "working" SRS that will be used for all features passing though this filter:
                working_srs = new_out_srs != null ? new_out_srs : env.getInputSRS();

                // LOCALIZE points around a local origin (the working extent's centroid)
                if (working_srs != null && getLocalize()) //&& env.getExtent().getArea() > 0.0 )
                {
                    if (env.getCellExtent().getSRS().isGeographic() && env.getCellExtent().getWidth() > 179.0)
                    {
                        //NOP - no localization for big geog extent ... needs more thought perhaps
                    }
                    else
                    {
                        GeoPoint centroid0 = new_out_srs != null ?
                            new_out_srs.transform(env.getCellExtent().getCentroid()) :
                            env.getCellExtent().getCentroid();

                        // we do want the localizer point on the surface if possible:
                        GeoPoint centroid = clampToTerrain(centroid0, env);
                        if (centroid == null)
                            centroid = centroid0;

                        Matrixd localizer;

                        // For geocentric datasets, we need a special localizer matrix:
                        if (working_srs.isGeocentric())
                        {
                            localizer = working_srs.getEllipsoid().createGeocentricInvRefFrame(centroid);
                            localizer.invert(localizer);
                        }

                        // For projected datasets, just a simple translation:
                        else
                        {
                            localizer = osg.Matrixd.translate(-centroid);
                        }

                        working_srs = working_srs.cloneWithNewReferenceFrame(localizer);
                    }
                }
            }

            // we have to assign the output SRS on each pass
            if (working_srs != null)
            {
                env.setOutputSRS(working_srs);
            }

            return base.process(input, env);
#endif
            //throw new NotImplementedException();

            if (successor != null)
            {
                if (successor is FeatureFilter)
                {
                    FeatureFilter filter = (FeatureFilter)successor;
                    FeatureList l = filter.process(output, env);
                }
                else if (successor is FragmentFilter)
                {
                    FragmentFilter filter = (FragmentFilter)successor;
                    FragmentList l = filter.process(output, env);
                }
            }

            return output;
        }
        public override FeatureList process(Feature input, FilterEnv env)
        {


            FeatureList output = new FeatureList();
            if (transform != null && !transform.Identity())
            {
                foreach (GeoShape shape in input.getShapes())
                {
                    XformVisitor visitor = new XformVisitor();
                    visitor.trans = transform;
                    shape.accept(visitor);
                }
            }

            output.Add(input);
            return output;
#if TODO
            // resolve the xlate shortcut
            Matrix working_matrix = xform_matrix;

            // TODO: this can go into process(FeatureList) instead of running for every feature..
            if (getTranslateScript() != null)
            {
                ScriptResult r = env.getScriptEngine().run(getTranslateScript(), input, env);
                if (r.isValid())
                    working_matrix = Matrix.translate(r.asVec3());
                else
                    env.getReport().error(r.asString());
            }

            if (working_srs != null || (working_matrix != null && !working_matrix.IsIdentity))
            {
                foreach (GeoShape shape in input.getShapes())
                {
                    if (working_matrix != null && !working_matrix.IsIdentity)
                    {

                        XformVisitor visitor;
                        visitor.mat = working_matrix;
                        shape.accept(visitor);
                    }

                    if (working_srs != null && !working_srs.equivalentTo(env.getInputSRS()))
                    {
                        working_srs.transformInPlace(shape);
                    }
                }
            }

            output.Add(input);
            return output;
#endif
            throw new NotImplementedException();
        }