本文整理了Java中org.geotools.referencing.CRS.reset()
方法的一些代码示例,展示了CRS.reset()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。CRS.reset()
方法的具体详情如下:
包路径:org.geotools.referencing.CRS
类名称:CRS
方法名:reset
[英]Resets some aspects of the referencing system. The aspects to be reset are specified by a space or comma delimited string, which may include any of the following elements:
代码示例来源:origin: geoserver/geoserver
public void reset() {
// drop all the catalog store/feature types/raster caches
catalog.getResourcePool().dispose();
// reset the referencing subsystem
CRS.reset("all");
// look for pluggable handlers
for (GeoServerLifecycleHandler handler :
GeoServerExtensions.extensions(GeoServerLifecycleHandler.class)) {
try {
handler.onReset();
} catch (Throwable t) {
LOGGER.log(
Level.SEVERE,
"A GeoServer lifecycle handler threw an exception during reset",
t);
}
}
}
}
代码示例来源:origin: geoserver/geoserver
@Override
protected void setUpTestData(SystemTestData testData) throws Exception {
new File(testData.getDataDirectoryRoot(), "user_projections").mkdir();
testData.copyTo(
OverrideCRSTest.class.getResourceAsStream("test_override_epsg.properties"),
"user_projections/epsg_overrides.properties");
CRS.reset("all");
testData.setUpSecurity();
}
代码示例来源:origin: geoserver/geoserver
CRS.reset("all");
LOGGER.info("Shut down GT referencing threads ");
代码示例来源:origin: geoserver/geoserver
@Override
protected void onSetUp(SystemTestData testData) throws Exception {
OLD_TMP_VALUE = System.getProperty(JAVA_IO_TMPDIR);
System.setProperty(JAVA_IO_TMPDIR, new File("./target").getCanonicalPath());
super.onSetUp(testData);
GeoServerResourceLoader loader1 = getResourceLoader();
GeoServerResourceLoader loader2 = GeoServerExtensions.bean(GeoServerResourceLoader.class);
// setup the grid file, the definitions and the tx overrides
new File(testData.getDataDirectoryRoot(), "user_projections").mkdir();
testData.copyTo(
OvverideTransformationsTest.class.getResourceAsStream("test_epsg.properties"),
"user_projections/epsg.properties");
testData.copyTo(
OvverideTransformationsTest.class.getResourceAsStream(
"test_epsg_operations.properties"),
"user_projections/epsg_operations.properties");
testData.copyTo(
OvverideTransformationsTest.class.getResourceAsStream("stgeorge.las"),
"user_projections/stgeorge.las");
testData.copyTo(
OvverideTransformationsTest.class.getResourceAsStream("stgeorge.los"),
"user_projections/stgeorge.los");
CRS.reset("all");
}
代码示例来源:origin: geoserver/geoserver
System.setProperty("org.geotools.referencing.forceXY", "true");
Hints.putSystemDefault(Hints.FORCE_AXIS_ORDER_HONORING, "http");
CRS.reset("all");
代码示例来源:origin: geotools/geotools
@BeforeClass
public static void setupClass() {
System.clearProperty("org.geotools.referencing.forceXY");
CRS.reset("all");
}
代码示例来源:origin: geotools/geotools
@BeforeClass
public static void setup() {
// System.setProperty("org.geotools.test.interactive", "true");
System.setProperty(GeoTools.FORCE_LONGITUDE_FIRST_AXIS_ORDER, "false");
CRS.reset("all");
}
代码示例来源:origin: geotools/geotools
@AfterClass
public static void clearClass() {
System.clearProperty("org.geotools.referencing.forceXY");
CRS.reset("all");
}
代码示例来源:origin: geotools/geotools
@BeforeClass
public static void setupClass() {
System.clearProperty("org.geotools.referencing.forceXY");
CRS.reset("all");
}
代码示例来源:origin: geotools/geotools
@BeforeClass
public static void cleanupCRS() {
System.setProperty(GeoTools.FORCE_LONGITUDE_FIRST_AXIS_ORDER, "true");
CRS.reset("all");
}
代码示例来源:origin: geotools/geotools
@AfterClass
public static void close() {
System.clearProperty(GeoTools.FORCE_LONGITUDE_FIRST_AXIS_ORDER);
CRS.reset("all");
}
代码示例来源:origin: geotools/geotools
protected void tearDownInternal() throws Exception {
System.clearProperty("org.geotools.referencing.forceXY");
Hints.removeSystemDefault(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER);
CRS.reset("all");
}
代码示例来源:origin: geotools/geotools
@BeforeClass
public static void setupClass() {
System.clearProperty("org.geotools.referencing.forceXY");
CRS.reset("all");
}
代码示例来源:origin: geotools/geotools
@BeforeClass
public static void init() {
// make sure CRS ordering is correct
CRS.reset("all");
System.setProperty(GeoTools.FORCE_LONGITUDE_FIRST_AXIS_ORDER, "true");
}
代码示例来源:origin: geotools/geotools
@BeforeClass
public static void setupClass() {
System.setProperty("org.geotools.referencing.forceXY", "true");
CRS.reset("all");
}
代码示例来源:origin: geotools/geotools
@BeforeClass
public static void prepareCRS() {
CRS.reset("all");
}
代码示例来源:origin: geotools/geotools
@BeforeClass
public static void setupCRS() throws FactoryException {
CRS.reset("all");
Hints.putSystemDefault(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.TRUE);
// the following is only to make the test work in Eclipse, where the test
// classpath is tainted by the test classpath of dependent modules (whilst in Maven it's
// not)
Set<CRSAuthorityFactory> factories =
ReferencingFactoryFinder.getCRSAuthorityFactories(null);
for (CRSAuthorityFactory factory : factories) {
if (factory.getClass().getSimpleName().equals("EPSGCRSAuthorityFactory")) {
ReferencingFactoryFinder.removeAuthorityFactory(factory);
}
}
assertEquals(
AxisOrder.NORTH_EAST, CRS.getAxisOrder(CRS.decode("urn:ogc:def:crs:EPSG::4326")));
}
代码示例来源:origin: geotools/geotools
public void testSRSAxisOrder() throws Exception {
try {
CoordinateReferenceSystem crs = CRS.decode("EPSG:4326");
assertEquals("EPSG:4326", CRS.toSRS(crs));
Hints.putSystemDefault(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.TRUE);
CRS.reset("ALL");
assertEquals("urn:ogc:def:crs:EPSG::4326", CRS.toSRS(crs));
} finally {
Hints.removeSystemDefault(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER);
}
}
代码示例来源:origin: geotools/geotools
/** Adds the extra factory to the set of authority factories. */
@Before
public void setUp() {
assertNull(extra);
CRS.reset("all");
extra = new FactoryEPSGExtra();
ReferencingFactoryFinder.addAuthorityFactory(extra);
ReferencingFactoryFinder.scanForPlugins();
}
代码示例来源:origin: geotools/geotools
CRS.reset("all");
System.setProperty("org.geotools.referencing.forceXY", "true");
CRS.reset("all");
Hints.putSystemDefault(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.TRUE);
assertEquals(AxisOrder.EAST_NORTH, CRS.getAxisOrder(CRS.decode("EPSG:4326", false)));
CRS.reset("all");
assertEquals(AxisOrder.NORTH_EAST, CRS.getAxisOrder(CRS.decode("EPSG:4326", false)));
assertEquals(AxisOrder.EAST_NORTH, CRS.getAxisOrder(CRS.decode("EPSG:4326", true)));
CRS.reset("all");
System.setProperty("org.geotools.referencing.forceXY", "true");
assertEquals(AxisOrder.EAST_NORTH, CRS.getAxisOrder(CRS.decode("EPSG:4326", false)));
内容来源于网络,如有侵权,请联系作者删除!