Revision 95
trunk/libraries/libCq CMS for java.old/.classpath | ||
---|---|---|
1 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 | 2 |
<classpath> |
3 |
<classpathentry kind="src" path="src"/> |
|
4 |
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> |
|
5 |
<classpathentry kind="lib" path="C:/java/lib/ermapper.jar"/> |
|
6 |
<classpathentry kind="lib" path="lib/geojava.jar"/> |
|
7 |
<classpathentry kind="output" path="bin"/> |
|
3 |
<classpathentry kind="src" path="src"/> |
|
4 |
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> |
|
5 |
<classpathentry kind="lib" path="C:/java/lib/ermapper.jar"/> |
|
6 |
<classpathentry kind="lib" path="lib/geojava.jar"/> |
|
7 |
<classpathentry kind="lib" path="lib/gt2cts.jar"/> |
|
8 |
<classpathentry kind="lib" path="lib/jmgeoraster.jar"/> |
|
9 |
<classpathentry kind="output" path="bin"/> |
|
8 | 10 |
</classpath> |
trunk/libraries/libCq CMS for java.old/ant.xml | ||
---|---|---|
1 |
<project name="CMS for Java" default="dist" basedir="."> |
|
2 |
<description> |
|
3 |
Genera el jar con CMS y sus dependencias |
|
4 |
</description> |
|
5 |
<!-- set global properties for this build --> |
|
6 |
<property name="src" location="src"/> |
|
7 |
<property name="build" location="bin"/> |
|
8 |
<property name="dist" location="dist"/> |
|
9 |
<property name="jar" value="cms"/> |
|
10 |
<!--property name="fmapdir" value="../FMap"/--> |
|
11 |
<property name="targetDir" location="c:\eclipse2\workspace\GVSIG\lib"/> |
|
12 |
|
|
13 |
<target name="init"> |
|
14 |
<!-- Create the time stamp --> |
|
15 |
<tstamp/> |
|
16 |
<!-- Create the build directory structure used by compile --> |
|
17 |
<mkdir dir="${build}"/> |
|
18 |
</target> |
|
19 |
|
|
20 |
<target name="compile" depends="init" |
|
21 |
description="compile the source " > |
|
22 |
<!-- Compile the java code from ${src} into ${build} |
|
23 |
<javac srcdir="${src}" destdir="${build}"/>--> |
|
24 |
</target> |
|
25 |
|
|
26 |
<target name="dist" depends="compile" |
|
27 |
description="generate the distribution" > |
|
28 |
<!-- Create the distribution directory --> |
|
29 |
<mkdir dir="${dist}"/> |
|
30 |
|
|
31 |
<!-- Put everything in ${build} into the cms-${DSTAMP}.jar file --> |
|
32 |
<copy todir="${build}"> |
|
33 |
<fileset dir="${src}" includes="**"/> |
|
34 |
</copy> |
|
35 |
<jar jarfile="${dist}/${jar}.jar" basedir="${build}"/> |
|
36 |
<copy todir="${dist}"> |
|
37 |
<fileset dir="./lib" includes="*.jar"/> |
|
38 |
</copy> |
|
39 |
|
|
40 |
<move todir="${targetDir}/"> |
|
41 |
<fileset dir="${dist}" includes="**/**"/> |
|
42 |
</move> |
|
43 |
</target> |
|
44 |
|
|
45 |
<target name="clean" |
|
46 |
description="clean up" > |
|
47 |
<!-- Delete the ${build} and ${dist} directory trees --> |
|
48 |
<delete dir="${build}"/> |
|
49 |
<delete dir="${dist}"/> |
|
50 |
</target> |
|
51 |
</project> |
|
52 |
|
|
0 | 53 |
trunk/libraries/libCq CMS for java.old/src/org/cresques/px/gml/LineString.java | ||
---|---|---|
58 | 58 |
Point2D ptDest = null; |
59 | 59 |
for (int i=0; i<saveLine.size(); i++) { |
60 | 60 |
ptDest = rp.getPDest().createPoint(0.0,0.0); |
61 |
rp.convert((Point2D) saveLine.get(i), ptDest); |
|
61 |
ptDest = rp.convert((Point2D) saveLine.get(i), ptDest);
|
|
62 | 62 |
data.add(ptDest); |
63 | 63 |
extent.add(ptDest); |
64 | 64 |
} |
trunk/libraries/libCq CMS for java.old/src/org/cresques/px/gml/Polygon.java | ||
---|---|---|
81 | 81 |
Point2D ptDest = null; |
82 | 82 |
for (int i=0; i<savePol.size(); i++) { |
83 | 83 |
ptDest = rp.getPDest().createPoint(0.0,0.0); |
84 |
rp.convert((Point2D) savePol.get(i), ptDest); |
|
84 |
ptDest = rp.convert((Point2D) savePol.get(i), ptDest);
|
|
85 | 85 |
outPol.addPoint(ptDest); |
86 | 86 |
extent.add(ptDest); |
87 | 87 |
} |
trunk/libraries/libCq CMS for java.old/src/org/cresques/px/dxf/DxfText.java | ||
---|---|---|
60 | 60 |
if (savePts[i] == null) |
61 | 61 |
ptDest = null; |
62 | 62 |
else { |
63 |
rp.convert((Point2D) savePts[i], ptDest); |
|
63 |
ptDest = rp.convert((Point2D) savePts[i], ptDest);
|
|
64 | 64 |
extent.add(ptDest); |
65 | 65 |
} |
66 | 66 |
pts[i] = ptDest; |
trunk/libraries/libCq CMS for java.old/src/org/cresques/px/dxf/DxfLine.java | ||
---|---|---|
47 | 47 |
Point2D ptDest = null; |
48 | 48 |
for (int i=0; i<savePts.length; i++) { |
49 | 49 |
ptDest = rp.getPDest().createPoint(0.0,0.0); |
50 |
rp.convert((Point2D) savePts[i], ptDest); |
|
50 |
ptDest = rp.convert((Point2D) savePts[i], ptDest);
|
|
51 | 51 |
pts[i] = ptDest; |
52 | 52 |
extent.add(ptDest); |
53 | 53 |
} |
trunk/libraries/libCq CMS for java.old/src/org/cresques/px/dxf/DxfPoint.java | ||
---|---|---|
43 | 43 |
if (savePt == null) |
44 | 44 |
ptDest = null; |
45 | 45 |
else { |
46 |
rp.convert((Point2D) savePt, ptDest); |
|
46 |
ptDest = rp.convert((Point2D) savePt, ptDest);
|
|
47 | 47 |
extent.add(ptDest); |
48 | 48 |
} |
49 | 49 |
pt = ptDest; |
trunk/libraries/libCq CMS for java.old/src/org/cresques/px/dxf/DxfPolyline.java | ||
---|---|---|
65 | 65 |
Point2D ptDest = null; |
66 | 66 |
for (int i=0; i<savePts.size(); i++) { |
67 | 67 |
ptDest = rp.getPDest().createPoint(0.0,0.0); |
68 |
rp.convert((Point2D) savePts.get(i), ptDest); |
|
68 |
ptDest = rp.convert((Point2D) savePts.get(i), ptDest);
|
|
69 | 69 |
pts.add(ptDest); |
70 | 70 |
extent.add(ptDest); |
71 | 71 |
} |
trunk/libraries/libCq CMS for java.old/src/org/cresques/px/dxf/DxfCircle.java | ||
---|---|---|
49 | 49 |
Point2D ptDest = null; |
50 | 50 |
for (int i=0; i<savePts.length; i++) { |
51 | 51 |
ptDest = rp.getPDest().createPoint(0.0,0.0); |
52 |
rp.convert((Point2D) savePts[i], ptDest); |
|
52 |
ptDest = rp.convert((Point2D) savePts[i], ptDest);
|
|
53 | 53 |
this.pts[i] = ptDest; |
54 | 54 |
extent.add(ptDest); |
55 | 55 |
} |
trunk/libraries/libCq CMS for java.old/src/org/cresques/px/dxf/DxfArc.java | ||
---|---|---|
49 | 49 |
Point2D ptDest = null; |
50 | 50 |
for (int i=0; i<savePts.length; i++) { |
51 | 51 |
ptDest = rp.getPDest().createPoint(0.0,0.0); |
52 |
rp.convert((Point2D) savePts[i], ptDest); |
|
52 |
ptDest = rp.convert((Point2D) savePts[i], ptDest);
|
|
53 | 53 |
this.pts[i] = ptDest; |
54 | 54 |
extent.add(ptDest); |
55 | 55 |
} |
trunk/libraries/libCq CMS for java.old/src/org/cresques/px/dxf/DxfSolid.java | ||
---|---|---|
52 | 52 |
Point2D ptDest = null; |
53 | 53 |
for (int i=0; i<savePts.length; i++) { |
54 | 54 |
ptDest = rp.getPDest().createPoint(0.0,0.0); |
55 |
rp.convert((Point2D) savePts[i], ptDest); |
|
55 |
ptDest = rp.convert((Point2D) savePts[i], ptDest);
|
|
56 | 56 |
this.pts[i] = ptDest; |
57 | 57 |
extent.add(ptDest); |
58 | 58 |
} |
trunk/libraries/libCq CMS for java.old/src/org/cresques/cts/gt2/CSDatum.java | ||
---|---|---|
23 | 23 |
"SPHEROID[\"International 1924\",6378388,297,"+ |
24 | 24 |
"AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-121,0,0,0,0],"+ |
25 | 25 |
"AUTHORITY[\"EPSG\",\"4274\"]]"; |
26 |
private static String line5 = "DATUM[\"North_American_Datum_1927\","+ |
|
27 |
"SPHEROID[\"Clarke 1866\",6378206.4,294.978698213901,"+ |
|
28 |
"AUTHORITY[\"EPSG\",\"7008\"]],TOWGS84[-3,142,183,0,0,0,0],"+ |
|
29 |
"AUTHORITY[\"EPSG\",\"6267\"]]"; |
|
26 | 30 |
public final static CSDatum wgs84 = new CSDatum(line1); |
27 | 31 |
public final static CSDatum ed50 = new CSDatum(line2); |
28 | 32 |
public final static CSDatum ntf = new CSDatum(line3); |
29 | 33 |
public final static CSDatum d73 = new CSDatum(line4); |
34 |
public final static CSDatum nad27 = new CSDatum(line5); |
|
30 | 35 |
|
31 | 36 |
private String sGeo1 = "GEOGCS[\"WGS 84\","; |
32 | 37 |
private String sGeo2 = ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"DMSH\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"Lat\",NORTH],AXIS[\"Long\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]"; |
trunk/libraries/libCq CMS for java.old/src/org/cresques/cts/gt2/CSLambertCC.java | ||
---|---|---|
1 |
/* |
|
2 |
* Creado el 13-ago-2004 |
|
3 |
*/ |
|
4 |
package org.cresques.cts.gt2; |
|
5 |
|
|
6 |
import org.geotools.cs.AxisInfo; |
|
7 |
import org.geotools.cs.FactoryException; |
|
8 |
import org.geotools.cs.GeographicCoordinateSystem; |
|
9 |
import org.geotools.cs.Projection; |
|
10 |
import org.geotools.pt.Angle; |
|
11 |
import org.geotools.units.Unit; |
|
12 |
|
|
13 |
/** |
|
14 |
* @author "Luis W. Sevilla" <sevilla_lui@gva.es> |
|
15 |
* |
|
16 |
*/ |
|
17 |
public class CSLambertCC extends CoordSys { |
|
18 |
public CSLambertCC(CSDatum datum, double meridian, double origin, double sp1, double sp2) { |
|
19 |
super(datum); |
|
20 |
geogCS = new GeographicCoordinateSystem( |
|
21 |
datum.getName(null), |
|
22 |
datum.getDatum()); |
|
23 |
Unit linearUnit = Unit.METRE; |
|
24 |
|
|
25 |
javax.media.jai.ParameterList params = |
|
26 |
csFactory.createProjectionParameterList("Lambert_Conformal_Conic_2SP"); |
|
27 |
params.setParameter("semi_major", datum.getDatum().getEllipsoid().getSemiMajorAxis()); |
|
28 |
params.setParameter("semi_minor", datum.getDatum().getEllipsoid().getSemiMinorAxis()); |
|
29 |
params.setParameter("central_meridian", meridian); |
|
30 |
params.setParameter("latitude_of_origin", origin); |
|
31 |
params.setParameter("standard_parallel_1", sp1); |
|
32 |
params.setParameter("standard_parallel_2", sp2); |
|
33 |
params.setParameter("false_easting", 0.0); |
|
34 |
params.setParameter("false_northing", 0.0); |
|
35 |
try { |
|
36 |
Projection projection = |
|
37 |
csFactory.createProjection("Lambert", "Lambert_Conformal_Conic_2SP", params); |
|
38 |
projCS = csFactory.createProjectedCoordinateSystem( |
|
39 |
projection.getName(null), geogCS, projection, linearUnit, AxisInfo.X, AxisInfo.Y); |
|
40 |
} catch (FactoryException e) { |
|
41 |
// TODO Bloque catch generado autom?ticamente |
|
42 |
e.printStackTrace(); |
|
43 |
} |
|
44 |
} |
|
45 |
|
|
46 |
public String toString() { |
|
47 |
return projCS.toString(); |
|
48 |
} |
|
49 |
} |
|
0 | 50 |
trunk/libraries/libCq CMS for java.old/src/org/cresques/cts/gt2/CoordSys.java | ||
---|---|---|
26 | 26 |
protected CSDatum datum = null; |
27 | 27 |
protected GeographicCoordinateSystem geogCS = null; |
28 | 28 |
protected ProjectedCoordinateSystem projCS = null; |
29 |
protected String abrev = ""; |
|
29 | 30 |
|
30 | 31 |
private static final Color basicGridColor = new Color(64,64,64,128); |
31 | 32 |
Color gridColor = basicGridColor; |
... | ... | |
77 | 78 |
return geogCS.toString(); |
78 | 79 |
} |
79 | 80 |
|
80 |
public String getAbrev() { |
|
81 |
return "CS..."; |
|
82 |
} |
|
81 |
public void setAbrev(String abrev) { this.abrev = abrev; } |
|
82 |
public String getAbrev() { return abrev; } |
|
83 | 83 |
|
84 | 84 |
/* (no Javadoc) |
85 | 85 |
* @see org.cresques.cts.IProjection#drawGrid(java.awt.Graphics2D, org.cresques.geo.ViewPortData) |
Also available in: Unified diff