Package org.opengis.referencing.crs

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem


  }

  @Test
  public void transformGeometryJtsCrs() throws Exception {
    Geometry geometry = getLineString();
    CoordinateReferenceSystem source = CRS.decode(LONLAT);
    CoordinateReferenceSystem target = CRS.decode(LAMBERT72);
    geometry = geoService.transform(geometry, source, target);
    assertTransformedLineString(geometry);
  }
View Full Code Here


        GetLocationResult[] result = geocoderService.getLocation(locationList, maxAlternatives, locale);
        if (null != result && result.length > 0) {
          for (GetLocationResult aResult : result) {
            aResult.setGeocoderName(geocoderService.getName());

            CoordinateReferenceSystem sourceCrs = geocoderService.getCrs();
            Envelope envelope = aResult.getEnvelope();

            // point locations needs to converted to an area based on configuration settings
            if (null == envelope) {
              envelope = geocoderUtilService.extendPoint(aResult.getCoordinate(), sourceCrs,
View Full Code Here

  @Autowired
  private GeoService geoService;

  @Test
  public void getCrsTest() throws Exception {
    CoordinateReferenceSystem crs = geoService.getCrs(MERCATOR);
    Assert.assertNotNull(crs);
    Assert.assertEquals(900913, geoService.getSridFromCrs(crs));
    Assert.assertEquals(MERCATOR, geoService.getCodeFromCrs(crs));
    crs = geoService.getCrs(LONLAT);
    Assert.assertNotNull(crs);
View Full Code Here

    Assert.assertEquals(LONLAT, geoService.getCodeFromCrs(crs));
  }

  @Test
  public void crsInfoTest() throws Exception {
    CoordinateReferenceSystem crs = CRS.decode(LONLAT);
    Assert.assertNotNull(crs);
    Assert.assertEquals(4326, geoService.getSridFromCrs(crs));
    Assert.assertEquals(LONLAT, geoService.getCodeFromCrs(crs));

    Assert.assertEquals(900913, geoService.getSridFromCrs(MERCATOR));
View Full Code Here

  }

  @Test
  public void transformGeometryJtsCrs() throws Exception {
    Geometry geometry = getLineString();
    CoordinateReferenceSystem source = CRS.decode(LONLAT);
    CoordinateReferenceSystem target = CRS.decode(LAMBERT72);

    Assert.assertEquals(geometry, geoService.transform(geometry, source, source));

    geometry = geoService.transform(geometry, source, target);
    assertTransformedLineString(geometry);
View Full Code Here

        }
      }
    }
    List<InternalFeature> features;
    try {
      CoordinateReferenceSystem crs = null;
      if (epsg != null) {
        crs = geoService.getCrs2("EPSG:" + epsg);
      }
      features = vectorLayerService.getFeatures(layerId, crs, and(filters), null, getIncludes(noGeom),
          getOffset(offset), getLimit(maxFeatures, limit));
View Full Code Here

  public void execute(PipelineContext context, List<RasterTile> response) throws GeomajasException {
    RasterLayer layer = context.get(PipelineCode.LAYER_KEY, RasterLayer.class);
    Envelope bounds = context.get(PipelineCode.BOUNDS_KEY, Envelope.class);
    double scale = context.get(PipelineCode.SCALE_KEY, Double.class);
    CoordinateReferenceSystem crs = context.get(PipelineCode.CRS_KEY, CoordinateReferenceSystem.class);
    List<RasterTile> images = layer.paint(crs, bounds, scale);
    response.addAll(images);
  }
View Full Code Here

  @Autowired
  private GeocoderUtilService geocoderUtilService;

  @Test
  public void transformEnvelopeTest() throws Exception {
    CoordinateReferenceSystem source = geoService.getCrs("EPSG:900913");
    CoordinateReferenceSystem target = geoService.getCrs("EPSG:4326");
    Envelope envelope = new Envelope(10, 20, 30, 40);
    Envelope transformed = geocoderUtilService.transform(envelope, source, target);
    Assert.assertEquals(8.983152841195215E-5, transformed.getMinX(), DELTA);
    Assert.assertEquals(2.6949458522981454E-4, transformed.getMinY(), DELTA);
    Assert.assertEquals(1.796630568239043E-4, transformed.getMaxX(), DELTA);
View Full Code Here

    Assert.assertEquals(3.593261136397527E-4, transformed.getMaxY(), DELTA);
  }

  @Test
  public void extendPointTest() throws Exception {
    CoordinateReferenceSystem crs;
    Coordinate coordinate;
    Envelope envelope;

    crs = geoService.getCrs("EPSG:900913");
    coordinate = new Coordinate(0, 0);
View Full Code Here

  @Qualifier("BooischotStrict")
  private StaticRegexGeocoderLocationInfo booischotStrict;

  @Test
  public void testGetCrs() throws Exception {
    CoordinateReferenceSystem crs = service.getCrs();
    Assert.assertEquals(900913, geoService.getSridFromCrs(crs));
  }
View Full Code Here

TOP

Related Classes of org.opengis.referencing.crs.CoordinateReferenceSystem

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.