Package org.geotools.referencing.crs

Examples of org.geotools.referencing.crs.DefaultGeographicCRS


    return shiftToWorld(pixelBounds);
  }

  static ReferencedEnvelope shiftToWorld(ReferencedEnvelope pixelBounds) {
    DefaultGeographicCRS wgs84 = DefaultGeographicCRS.WGS84;
    ReferencedEnvelope latLong;
    try {
      latLong = pixelBounds.transform(wgs84, true);

      if (WORLD.contains(latLong)) {
View Full Code Here


        org.geoserver.catalog.FeatureTypeInfo featureTypeInfo = new FeatureTypeInfoImpl(catalog);
        featureTypeInfo.setName(name);
        featureTypeInfo.setNativeName(name);
        featureTypeInfo.setEnabled(true);

        final DefaultGeographicCRS wgs84 = DefaultGeographicCRS.WGS84;

        ReferencedEnvelope bbox = new ReferencedEnvelope(-180, 180, -90, 90, wgs84);
        featureTypeInfo.setLatLonBoundingBox(bbox);
        featureTypeInfo.setNamespace(namespaceInfo);
        featureTypeInfo.setNativeBoundingBox(bbox);
View Full Code Here

        DefaultFeatureCollection newCollection = new DefaultFeatureCollection();
       
        int index = 0;
        SimpleFeature f;
        DefaultGeographicCRS crs = DefaultGeographicCRS.WGS84;
        SimpleFeatureTypeBuilder b = new SimpleFeatureTypeBuilder();
        b.setName(kml.getName());
        b.setCRS(crs);
        b.add("name", String.class);
        b.add("the_geom", Geometry.class); //$NON-NLS-1$
View Full Code Here

          //
          // Create a user-defined GCRS using the provided angular
          // unit.
          //
          // //
          gcs = new DefaultGeographicCRS(DefaultEllipsoidalCS
              .getName(gcs, new CitationImpl("EPSG")),
              (GeodeticDatum) gcs.getDatum(),
              DefaultEllipsoidalCS.GEODETIC_2D
                  .usingUnit(angularUnit));
        }
View Full Code Here

          //
          // Create a user-defined GCRS using the provided angular
          // unit.
          //
          // //
          gcs = new DefaultGeographicCRS(DefaultEllipsoidalCS
              .getName(gcs, new CitationImpl("EPSG")),
              (GeodeticDatum) gcs.getDatum(),
              DefaultEllipsoidalCS.GEODETIC_2D
                  .usingUnit(angularUnit));
        }
View Full Code Here

    // coordinate reference system
                // property map is reused
                final Map<String, String> props = new HashMap<String, String>();
                // make the user defined GCS from all the components...
                props.put("name", name);
                return new DefaultGeographicCRS(
                        props,
                        datum,
                        DefaultEllipsoidalCS.GEODETIC_2D.usingUnit(angularUnit));

View Full Code Here

        double realValue = 16451.33114;
        assertEquals(realValue, d, 0.1);
    }
   
    public void testCheckCoordinateRange() throws Exception {
       DefaultGeographicCRS crs = DefaultGeographicCRS.WGS84;
      
       // valid
       JTS.checkCoordinatesRange(JTS.toGeometry(new Envelope(-10, 10, -10, 10)),crs);
      
       // invalid lat
View Full Code Here

           // fine
       }
    }

    public void testToGeoemtry(){
        DefaultGeographicCRS crs = DefaultGeographicCRS.WGS84;
       
        // straight up
        Polygon polygon = JTS.toGeometry(new Envelope(-10, 10, -10, 10) );
        assertEquals( 5, polygon.getExteriorRing().getCoordinateSequence().size() );
       
View Full Code Here

       
        builder = new GeometryBuilder(DefaultGeographicCRS.WGS84);               
    }
    /** We need to create a large surface with 7000 points */
    public void testLargeSurfaceFactory(){
        DefaultGeographicCRS crs = DefaultGeographicCRS.WGS84;
        PositionFactory postitionFactory = new PositionFactoryImpl( crs );
        PrimitiveFactory primitiveFactory = new PrimitiveFactoryImpl( crs, postitionFactory );
        GeometryFactory geometryFactory = new GeometryFactoryImpl( crs, postitionFactory );
       
        int NUMBER = 100000;
View Full Code Here

   
    public static GeographicCRS getBaseCRS(final double firstParameter,
            final double secondParameter, final boolean isSecondParameterInverseFlattening){
        final DefaultGeodeticDatum datum;
        datum = CRSUtilities.getDefaultGeodeticDatum("WGS84", firstParameter, secondParameter, SI.METER, isSecondParameterInverseFlattening);
        final GeographicCRS sourceCRS = new DefaultGeographicCRS("WGS-84", datum, DefaultGeographicCRS.WGS84.getCoordinateSystem());
        return sourceCRS;
    }
View Full Code Here

TOP

Related Classes of org.geotools.referencing.crs.DefaultGeographicCRS

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.