Package org.geotools.referencing.factory

Examples of org.geotools.referencing.factory.IdentifiedObjectFinder.find()


    public void testFind() throws FactoryException {
        final IdentifiedObjectFinder finder = factory.getIdentifiedObjectFinder(
                CoordinateReferenceSystem.class);
        assertTrue("Full scan should be enabled by default.", finder.isFullScanAllowed());
        assertNull("Should not find WGS84 because the axis order is not the same.",
                   finder.find(DefaultGeographicCRS.WGS84));

        String wkt;
        wkt = "GEOGCS[\"WGS 84\",\n"                                    +
              "  DATUM[\"World Geodetic System 1984\",\n"               +
              "    SPHEROID[\"WGS 84\", 6378137.0, 298.257223563]],\n"  +
View Full Code Here


              "  AXIS[\"Geodetic longitude\", EAST]]";
        CoordinateReferenceSystem crs = CRS.parseWKT(wkt);
        finder.setFullScanAllowed(false);
        assertNull("Should not find without a full scan, because the WKT contains no identifier " +
                   "and the CRS name is ambiguous (more than one EPSG object have this name).",
                   finder.find(crs));

        finder.setFullScanAllowed(true);
        IdentifiedObject find = finder.find(crs);
        assertNotNull("With full scan allowed, the CRS should be found.", find);
        assertTrue("Should found an object equals (ignoring metadata) to the requested one.",
View Full Code Here

        assertNull("Should not find without a full scan, because the WKT contains no identifier " +
                   "and the CRS name is ambiguous (more than one EPSG object have this name).",
                   finder.find(crs));

        finder.setFullScanAllowed(true);
        IdentifiedObject find = finder.find(crs);
        assertNotNull("With full scan allowed, the CRS should be found.", find);
        assertTrue("Should found an object equals (ignoring metadata) to the requested one.",
                   CRS.equalsIgnoreMetadata(crs, find));
        assertEquals("4326",
                AbstractIdentifiedObject.getIdentifier(find, factory.getAuthority()).getCode());
View Full Code Here

              "   UNIT[\"m\", 1.0],\n"                                     +
              "   AXIS[\"Northing\", NORTH],\n"                            +
              "   AXIS[\"Easting\", EAST]]";
        crs = CRS.parseWKT(wkt);
        finder.setFullScanAllowed(false);
        assertNull("Should not find the CRS without a full scan.", finder.find(crs));
        finder.setFullScanAllowed(true);
        find = finder.find(crs);
        assertNotNull("With full scan allowed, the CRS should be found.", find);
        assertTrue("Should found an object equals (ignoring metadata) to the requested one.",
                   CRS.equalsIgnoreMetadata(crs, find));
View Full Code Here

              "   AXIS[\"Easting\", EAST]]";
        crs = CRS.parseWKT(wkt);
        finder.setFullScanAllowed(false);
        assertNull("Should not find the CRS without a full scan.", finder.find(crs));
        finder.setFullScanAllowed(true);
        find = finder.find(crs);
        assertNotNull("With full scan allowed, the CRS should be found.", find);
        assertTrue("Should found an object equals (ignoring metadata) to the requested one.",
                   CRS.equalsIgnoreMetadata(crs, find));
        assertEquals("2442", AbstractIdentifiedObject.getIdentifier(find, factory.getAuthority()).getCode());
        finder.setFullScanAllowed(false);
View Full Code Here

    public void testFind() throws FactoryException {
        final IdentifiedObjectFinder finder = factory.getIdentifiedObjectFinder(
                CoordinateReferenceSystem.class);
        assertTrue("Full scan should be enabled by default.", finder.isFullScanAllowed());
        assertNull("Should not find WGS84 because the axis order is not the same.",
                   finder.find(DefaultGeographicCRS.WGS84));

        String wkt;
        wkt = "GEOGCS[\"WGS 84\",\n"                                    +
              "  DATUM[\"World Geodetic System 1984\",\n"               +
              "    SPHEROID[\"WGS 84\", 6378137.0, 298.257223563]],\n"  +
View Full Code Here

              "  AXIS[\"Geodetic longitude\", EAST]]";
        CoordinateReferenceSystem crs = CRS.parseWKT(wkt);
        finder.setFullScanAllowed(false);
        assertNull("Should not find without a full scan, because the WKT contains no identifier " +
                   "and the CRS name is ambiguous (more than one EPSG object have this name).",
                   finder.find(crs));

        finder.setFullScanAllowed(true);
        IdentifiedObject find = finder.find(crs);
        assertNotNull("With full scan allowed, the CRS should be found.", find);
        assertTrue("Should found an object equals (ignoring metadata) to the requested one.",
View Full Code Here

        assertNull("Should not find without a full scan, because the WKT contains no identifier " +
                   "and the CRS name is ambiguous (more than one EPSG object have this name).",
                   finder.find(crs));

        finder.setFullScanAllowed(true);
        IdentifiedObject find = finder.find(crs);
        assertNotNull("With full scan allowed, the CRS should be found.", find);
        assertTrue("Should found an object equals (ignoring metadata) to the requested one.",
                   CRS.equalsIgnoreMetadata(crs, find));
        assertEquals("4326",
                AbstractIdentifiedObject.getIdentifier(find, factory.getAuthority()).getCode());
View Full Code Here

              "   AXIS[\"Northing\", NORTH],\n"                            +
              "   AXIS[\"Easting\", EAST]]";
        crs = CRS.parseWKT(wkt);

        finder.setFullScanAllowed(false);
        IdentifiedObject found = finder.find(crs);
        assertTrue("Should not find the CRS without a full scan.", found == null || found != null );

        finder.setFullScanAllowed(true);
        find = finder.find(crs);
        assertNotNull("With full scan allowed, the CRS should be found.", find);
View Full Code Here

        finder.setFullScanAllowed(false);
        IdentifiedObject found = finder.find(crs);
        assertTrue("Should not find the CRS without a full scan.", found == null || found != null );

        finder.setFullScanAllowed(true);
        find = finder.find(crs);
        assertNotNull("With full scan allowed, the CRS should be found.", find);

        assertTrue("Should found an object equals (ignoring metadata) to the requested one.",
                   CRS.equalsIgnoreMetadata(crs, find));
        assertEquals("2442", AbstractIdentifiedObject.getIdentifier(find, factory.getAuthority()).getCode());
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.