Package utils

Examples of utils.FeatureAttributeFormatter


                    route.originalShape = multiLineString;
                    route.originalShape.setSRID(4326);
                   
                    if(gisUpload.fieldName != null)
                  {
                    FeatureAttributeFormatter attribFormatter = new FeatureAttributeFormatter(gisUpload.fieldName);
                    route.routeName =  attribFormatter.format(feature);
                   
                  }
                  if(gisUpload.fieldId != null)
                {
                  FeatureAttributeFormatter attribFormatter = new FeatureAttributeFormatter(gisUpload.fieldId);
                  route.routeId =  attribFormatter.format(feature);
                }
                if(gisUpload.fieldDescription != null)
                {
                  FeatureAttributeFormatter attribFormatter = new FeatureAttributeFormatter(gisUpload.fieldDescription);
                  route.description =  attribFormatter.format(feature);
                }
                 
                  route.save();
                 
                  route.processSegments();
                 
                   }
                else if(gisUpload.type == GisUploadType.STOPS)
                {
                  if(geomType.getBinding() != Point.class)
                  {
                    Logger.error("Unexpected geometry type: ", geomType);
                    continue;
                  }
               
                  GisStop stop = new GisStop();
                   
                  stop.gisUpload = gisUpload;
                  stop.agency = gisUpload.agency;
                  stop.oid = feature.getID();
                  stop.shape = (Point)JTS.transform((Geometry)feature.getDefaultGeometry(), transform);
                  stop.shape.setSRID(4326);
                   
                  if(gisUpload.fieldName != null)
                  {
                    FeatureAttributeFormatter attribFormatter = new FeatureAttributeFormatter(gisUpload.fieldName);
                    stop.stopName =  attribFormatter.format(feature);
                  }
                  if(gisUpload.fieldId != null)
                  {
                    FeatureAttributeFormatter attribFormatter = new FeatureAttributeFormatter(gisUpload.fieldId);
                    stop.stopId =  attribFormatter.format(feature);
                  }
                  if(gisUpload.fieldDescription != null)
                  {
                    FeatureAttributeFormatter attribFormatter = new FeatureAttributeFormatter(gisUpload.fieldDescription);
                    stop.description =  attribFormatter.format(feature);
                  }
                 
                    stop.save();
                }
              } 
View Full Code Here

TOP

Related Classes of utils.FeatureAttributeFormatter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.