// Path: gtfs-validation-lib/src/main/java/com/conveyal/gtfs/model/ProjectedCoordinate.java
// public class ProjectedCoordinate extends Coordinate {
// 
//   private static final long serialVersionUID = 2905131060296578237L;
// 
//   final private MathTransform transform;
//   final private Coordinate refLatLon;
// 
//   public ProjectedCoordinate(MathTransform mathTransform,
//     Coordinate to, Coordinate refLatLon) {
//     this.transform = mathTransform;
//     this.x = to.x;
//     this.y = to.y;
//     this.refLatLon = refLatLon;
//   }
// 
//   public String epsgCode() {
//     final String epsgCode =
//         "EPSG:" + GeoUtils.getEPSGCodefromUTS(refLatLon);
//     return epsgCode;
//   }
// 
//   public Coordinate getReferenceLatLon() {
//     return refLatLon;
//   }
// 
//   public MathTransform getTransform() {
//     return transform;
//   }
//   
//   public double getX()  {
// 	  return this.x;
//   }
//   
//   public double getY()  {
// 	  return this.y;
//   }
// 
// 
// }


import java.util.ArrayList;
import java.util.List;
import java.util.TreeSet;
import org.geotools.geometry.GeometryBuilder;
import org.geotools.geometry.jts.JTS;
import org.geotools.referencing.CRS;
import org.geotools.referencing.crs.DefaultGeographicCRS;
import org.onebusaway.gtfs.model.ShapePoint;
import org.opengis.referencing.FactoryException;
import org.opengis.referencing.NoSuchIdentifierException;
import org.opengis.referencing.crs.CRSAuthorityFactory;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.opengis.referencing.crs.GeographicCRS;
import org.opengis.referencing.operation.MathTransform;
import org.opengis.referencing.operation.TransformException;
import com.conveyal.gtfs.model.ProjectedCoordinate;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.GeometryFactory;
import com.vividsolutions.jts.geom.PrecisionModel;
package com.conveyal.gtfs.service;




 public class GeoUtils {
	public static double RADIANS = 2 * Math.PI;

	public static MathTransform recentMathTransform = null;
	public static GeometryFactory geometryFactory = new GeometryFactory(new PrecisionModel(),4326);
	public static GeometryFactory projectedGeometryFactory = new GeometryFactory(new PrecisionModel());
	public static GeometryBuilder builder = new GeometryBuilder(DefaultGeographicCRS.WGS84);

	/**
	 * Converts from a coordinate to The appropriate UTM zone. 
	 * 
	 * @param latlon THE ORDER OF THE COORDINATE MUST BE LAT, LON!
	 * @return
	 */
// Path: gtfs-validation-lib/src/main/java/com/conveyal/gtfs/model/ProjectedCoordinate.java
// public class ProjectedCoordinate extends Coordinate {
// 
//   private static final long serialVersionUID = 2905131060296578237L;
// 
//   final private MathTransform transform;
//   final private Coordinate refLatLon;
// 
//   public ProjectedCoordinate(MathTransform mathTransform,
//     Coordinate to, Coordinate refLatLon) {
//     this.transform = mathTransform;
//     this.x = to.x;
//     this.y = to.y;
//     this.refLatLon = refLatLon;
//   }
// 
//   public String epsgCode() {
//     final String epsgCode =
//         "EPSG:" + GeoUtils.getEPSGCodefromUTS(refLatLon);
//     return epsgCode;
//   }
// 
//   public Coordinate getReferenceLatLon() {
//     return refLatLon;
//   }
// 
//   public MathTransform getTransform() {
//     return transform;
//   }
//   
//   public double getX()  {
// 	  return this.x;
//   }
//   
//   public double getY()  {
// 	  return this.y;
//   }
// 
// 
// }


// Path: gtfs-validation-lib/src/main/java/com/conveyal/gtfs/service/GeoUtils.java
import java.util.ArrayList;
import java.util.List;
import java.util.TreeSet;
import org.geotools.geometry.GeometryBuilder;
import org.geotools.geometry.jts.JTS;
import org.geotools.referencing.CRS;
import org.geotools.referencing.crs.DefaultGeographicCRS;
import org.onebusaway.gtfs.model.ShapePoint;
import org.opengis.referencing.FactoryException;
import org.opengis.referencing.NoSuchIdentifierException;
import org.opengis.referencing.crs.CRSAuthorityFactory;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.opengis.referencing.crs.GeographicCRS;
import org.opengis.referencing.operation.MathTransform;
import org.opengis.referencing.operation.TransformException;
import com.conveyal.gtfs.model.ProjectedCoordinate;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.GeometryFactory;
import com.vividsolutions.jts.geom.PrecisionModel;

package com.conveyal.gtfs.service;




 public class GeoUtils {
	public static double RADIANS = 2 * Math.PI;

	public static MathTransform recentMathTransform = null;
	public static GeometryFactory geometryFactory = new GeometryFactory(new PrecisionModel(),4326);
	public static GeometryFactory projectedGeometryFactory = new GeometryFactory(new PrecisionModel());
	public static GeometryBuilder builder = new GeometryBuilder(DefaultGeographicCRS.WGS84);

	/**
	 * Converts from a coordinate to The appropriate UTM zone. 
	 * 
	 * @param latlon THE ORDER OF THE COORDINATE MUST BE LAT, LON!
	 * @return
	 */
	public static ProjectedCoordinate convertLatLonToEuclidean(