Examples of CoordinateReferenceSystem


Examples of com.bbn.openmap.proj.coords.CoordinateReferenceSystem

        e1.setAttribute("maxy", "90");
        layers.appendChild(e1);
    }

    private void appendSRSBoundingBox(Document doc, Element layers, String crsCode) {
        CoordinateReferenceSystem crs = CoordinateReferenceSystem.getForCode(crsCode);
        BoundingBox bbox = crs.getBoundingBox();
        if (bbox == null) {
            return;
        }
        org.w3c.dom.Element e1 = (org.w3c.dom.Element) node(doc, "BoundingBox");
        e1.setAttribute("SRS", crs.getCode());
        e1.setAttribute("minx", Double.toString(bbox.getMinX()));
        e1.setAttribute("miny", Double.toString(bbox.getMinY()));
        e1.setAttribute("maxx", Double.toString(bbox.getMaxX()));
        e1.setAttribute("maxy", Double.toString(bbox.getMaxY()));
        layers.appendChild(e1);
View Full Code Here

Examples of com.bbn.openmap.proj.coords.CoordinateReferenceSystem

        if (strSRS == null) {
            throw new WMSException("Missing SRS parameter.");
        }
       
        System.out.println("crs: " + strSRS);
        CoordinateReferenceSystem crs = CoordinateReferenceSystem.getForCode(strSRS);
        if (crs == null) {
            throw new WMSException("Invalid SRS/CRS parameter: " + strSRS, WMSException.INVALIDSRS);
        }
        parameters.crs = crs;
    }
View Full Code Here

Examples of com.bbn.openmap.proj.coords.CoordinateReferenceSystem

            double maxY = Double.parseDouble(arrayBBox[3]);
            double medX = ((maxX - minX) / 2d) + minX;
            double medY = ((maxY - minY) / 2d) + minY;

            // use CRS to convert BBOX to latlon values
            CoordinateReferenceSystem crs = parameters.crs;
            parameters.bboxLatLonMinXY = crs.inverse(minX, minY);
            parameters.bboxLatLonMaxXY = crs.inverse(maxX, maxY);
            parameters.bboxLatLonCenter = crs.inverse(medX, medY);

            // TODO: use CRS to check value validity?
        } catch (NumberFormatException e) {
            throw new WMSException(
                    "Invalid BBOX parameter. BBOX parameter must be in the form of minx, miny, maxx, maxy"
View Full Code Here

Examples of org.geotools.imageio.metadataold.CoordinateReferenceSystem

  }

  protected void setCoordinateReferenceSystemElement(SpatioTemporalImageReader reader) {
        getAttributesMap(reader);
        init(reader);
        CoordinateReferenceSystem crs = getCRS(SpatioTemporalMetadataFormat.PROJECTED);
        crs.setBaseCRS(new Identification("WGS 84", null, null,"EPSG:4326"));
       
        switch (hdf4_type) {
        case TeraScan:
           setTerascanCRS(crs);
           break;
View Full Code Here

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

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem

        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

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem

  @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

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem

    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

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);

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

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

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem

        }
      }
    }
    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
TOP
Copyright © 2018 www.massapi.com. 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.