Last change
on this file since 3874 was 3874, checked in by bastiK, 13 years ago |
use classloader to find projections from plugins
|
File size:
1.3 KB
|
Line | |
---|
1 | // License: GPL. Copyright 2007 by Immanuel Scholz and others
|
---|
2 | package org.openstreetmap.josm.data.projection;
|
---|
3 |
|
---|
4 | import java.util.Arrays;
|
---|
5 | import java.util.ArrayList;
|
---|
6 |
|
---|
7 | /**
|
---|
8 | * Class to handle projections
|
---|
9 | *
|
---|
10 | */
|
---|
11 | public class Projections {
|
---|
12 | /**
|
---|
13 | * List of all available projections.
|
---|
14 | */
|
---|
15 | private static ArrayList<Projection> allProjections =
|
---|
16 | new ArrayList<Projection>(Arrays.asList(new Projection[] {
|
---|
17 | // global projections
|
---|
18 | new Epsg4326(),
|
---|
19 | new Mercator(),
|
---|
20 | new UTM(),
|
---|
21 | // regional - alphabetical order by country name
|
---|
22 | new LambertEST(), // Still needs proper default zoom
|
---|
23 | new Lambert(), // Still needs proper default zoom
|
---|
24 | new LambertCC9Zones(), // Still needs proper default zoom
|
---|
25 | new UTM_France_DOM(),
|
---|
26 | new TransverseMercatorLV(),
|
---|
27 | new Puwg(),
|
---|
28 | new Epsg3008(), // SWEREF99 13 30
|
---|
29 | new SwissGrid(),
|
---|
30 | }));
|
---|
31 |
|
---|
32 | public static ArrayList<Projection> getProjections() {
|
---|
33 | return allProjections;
|
---|
34 | }
|
---|
35 |
|
---|
36 | /**
|
---|
37 | * Adds a new projection to the list of known projections.
|
---|
38 | *
|
---|
39 | * For Plugins authors: make sure your plugin is an early plugin, i.e. put
|
---|
40 | * Plugin-Early=true in your Manifest.
|
---|
41 | */
|
---|
42 | public static void addProjection(Projection proj) {
|
---|
43 | allProjections.add(proj);
|
---|
44 | }
|
---|
45 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.