Issue #2718 Update to GeoTools 10.5
Undo reformatting of ncep code Move com.raytheon.edex.common.shapefiles.ShapeFile.java to com.raytheon.edex.plugin.radar.util Change-Id: I2bdf4d7d08061ace24589dafca26f00bac00aa2a Former-commit-id: efc65ad66fc4df90319f821f289e13dc9dbeb3a0
This commit is contained in:
parent
6b51b05bdf
commit
1c727465ee
143 changed files with 1256 additions and 4101 deletions
|
@ -48,11 +48,4 @@
|
|||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.viz.shapefile"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
|
|
|
@ -40,7 +40,7 @@ import org.eclipse.swt.widgets.Composite;
|
|||
import org.eclipse.swt.widgets.DirectoryDialog;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.geotools.data.DataStore;
|
||||
import org.geotools.data.directory.DirectoryDataStoreFactory;
|
||||
import org.geotools.data.shapefile.ShapefileDirectoryFactory;
|
||||
|
||||
import com.raytheon.uf.viz.gisdatastore.IGisDataStorePlugin;
|
||||
import com.raytheon.uf.viz.gisdatastore.directory.rsc.DirectoryDataStoreResourceData;
|
||||
|
@ -57,7 +57,8 @@ import com.raytheon.uf.viz.gisdatastore.rsc.DataStoreResourceData;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Dec 6, 2012 randerso Initial creation
|
||||
* Dec 6, 2012 randerso Initial creation
|
||||
* Mar 11, 2014 #2718 randerso Changes for GeoTools 10.5
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -161,7 +162,7 @@ public class DirectoryDataStorePlugin implements IGisDataStorePlugin {
|
|||
URL url = new File(dir).toURI().toURL();
|
||||
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put(DirectoryDataStoreFactory.URLP.key, url);
|
||||
params.put(ShapefileDirectoryFactory.URLP.key, url);
|
||||
|
||||
DataStoreResourceData rd = constructResourceData(null, params);
|
||||
DataStore dataStore = rd.getDataStore();
|
||||
|
|
|
@ -29,7 +29,7 @@ import javax.xml.bind.annotation.XmlAccessType;
|
|||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
|
||||
import org.geotools.data.DataStore;
|
||||
import org.geotools.data.directory.DirectoryDataStoreFactory;
|
||||
import org.geotools.data.shapefile.ShapefileDirectoryFactory;
|
||||
|
||||
import com.raytheon.uf.viz.gisdatastore.rsc.DataStoreResourceData;
|
||||
|
||||
|
@ -43,6 +43,7 @@ import com.raytheon.uf.viz.gisdatastore.rsc.DataStoreResourceData;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 31, 2012 #1326 randerso Initial creation
|
||||
* Mar 11, 2014 #2718 randerso Changes for GeoTools 10.5
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -62,7 +63,7 @@ public class DirectoryDataStoreResourceData extends DataStoreResourceData {
|
|||
|
||||
@Override
|
||||
protected DataStore constructDataStore() throws IOException {
|
||||
DirectoryDataStoreFactory factory = new DirectoryDataStoreFactory();
|
||||
ShapefileDirectoryFactory factory = new ShapefileDirectoryFactory();
|
||||
Map<String, Serializable> params = new HashMap<String, Serializable>();
|
||||
for (Entry<String, Object> entry : getConnectionParameters().entrySet()) {
|
||||
if (entry.getValue() instanceof Serializable) {
|
||||
|
|
|
@ -24,7 +24,6 @@ import java.io.IOException;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -37,11 +36,12 @@ import org.eclipse.swt.graphics.Rectangle;
|
|||
import org.geotools.coverage.grid.GeneralGridEnvelope;
|
||||
import org.geotools.coverage.grid.GridGeometry2D;
|
||||
import org.geotools.data.DataStore;
|
||||
import org.geotools.data.DefaultQuery;
|
||||
import org.geotools.data.FeatureSource;
|
||||
import org.geotools.data.Query;
|
||||
import org.geotools.data.simple.SimpleFeatureCollection;
|
||||
import org.geotools.data.simple.SimpleFeatureIterator;
|
||||
import org.geotools.data.simple.SimpleFeatureSource;
|
||||
import org.geotools.factory.CommonFactoryFinder;
|
||||
import org.geotools.factory.GeoTools;
|
||||
import org.geotools.feature.FeatureCollection;
|
||||
import org.geotools.geometry.GeneralEnvelope;
|
||||
import org.geotools.geometry.jts.JTS;
|
||||
import org.geotools.referencing.operation.DefaultMathTransformFactory;
|
||||
|
@ -114,6 +114,7 @@ import com.vividsolutions.jts.geom.Point;
|
|||
* Jul 24, 2013 #1907 randerso Fixed sampling when cropped
|
||||
* Jul 24, 2013 #1908 randerso Update attributes when cropped
|
||||
* Feb 18, 2014 #2819 randerso Removed unnecessary clones of geometries
|
||||
* Mar 11, 2014 #2718 randerso Changes for GeoTools 10.5
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -626,7 +627,7 @@ public class DataStoreResource extends
|
|||
private void loadAttributes() {
|
||||
ITimer timer = TimeUtil.getTimer();
|
||||
timer.start();
|
||||
DefaultQuery query = new DefaultQuery();
|
||||
Query query = new Query();
|
||||
query.setTypeName(typeName);
|
||||
|
||||
FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(GeoTools
|
||||
|
@ -654,17 +655,17 @@ public class DataStoreResource extends
|
|||
}
|
||||
query.setFilter(ff.or(filterList));
|
||||
|
||||
FeatureCollection<SimpleFeatureType, SimpleFeature> featureCollection = null;
|
||||
Iterator<SimpleFeature> featureIterator = null;
|
||||
SimpleFeatureCollection featureCollection = null;
|
||||
SimpleFeatureIterator featureIterator = null;
|
||||
try {
|
||||
FeatureSource<SimpleFeatureType, SimpleFeature> featureSource = dataStore
|
||||
SimpleFeatureSource featureSource = dataStore
|
||||
.getFeatureSource(typeName);
|
||||
|
||||
featureCollection = featureSource.getFeatures(query);
|
||||
|
||||
int size = featureCollection.size();
|
||||
attributes = new Object[size][attributeNames.length];
|
||||
featureIterator = featureCollection.iterator();
|
||||
featureIterator = featureCollection.features();
|
||||
int i = 0;
|
||||
while (featureIterator.hasNext()) {
|
||||
int index = i++;
|
||||
|
@ -686,7 +687,7 @@ public class DataStoreResource extends
|
|||
e.getLocalizedMessage(), e);
|
||||
} finally {
|
||||
if (featureIterator != null) {
|
||||
featureCollection.close(featureIterator);
|
||||
featureIterator.close();
|
||||
}
|
||||
}
|
||||
timer.stop();
|
||||
|
@ -1264,7 +1265,7 @@ public class DataStoreResource extends
|
|||
// ITimer timer = TimeUtil.getTimer();
|
||||
// timer.start();
|
||||
|
||||
DefaultQuery query = new DefaultQuery();
|
||||
Query query = new Query();
|
||||
query.setTypeName(typeName);
|
||||
|
||||
FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(GeoTools
|
||||
|
@ -1315,16 +1316,16 @@ public class DataStoreResource extends
|
|||
// query.setFilter(ff.and(clickFilter, boundingFilter));
|
||||
query.setFilter(clickFilter);
|
||||
|
||||
FeatureCollection<SimpleFeatureType, SimpleFeature> featureCollection = null;
|
||||
Iterator<SimpleFeature> featureIterator = null;
|
||||
SimpleFeatureCollection featureCollection = null;
|
||||
SimpleFeatureIterator featureIterator = null;
|
||||
List<SimpleFeature> features;
|
||||
try {
|
||||
FeatureSource<SimpleFeatureType, SimpleFeature> featureSource = dataStore
|
||||
SimpleFeatureSource featureSource = dataStore
|
||||
.getFeatureSource(typeName);
|
||||
|
||||
featureCollection = featureSource.getFeatures(query);
|
||||
features = new ArrayList<SimpleFeature>(featureCollection.size());
|
||||
featureIterator = featureCollection.iterator();
|
||||
featureIterator = featureCollection.features();
|
||||
|
||||
while (featureIterator.hasNext()) {
|
||||
SimpleFeature f = featureIterator.next();
|
||||
|
@ -1339,7 +1340,7 @@ public class DataStoreResource extends
|
|||
features = Collections.emptyList();
|
||||
} finally {
|
||||
if (featureIterator != null) {
|
||||
featureCollection.close(featureIterator);
|
||||
featureIterator.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ import java.util.ArrayList;
|
|||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
@ -17,11 +16,12 @@ import org.eclipse.core.runtime.IStatus;
|
|||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.geotools.data.DefaultQuery;
|
||||
import org.geotools.data.FeatureSource;
|
||||
import org.geotools.data.Query;
|
||||
import org.geotools.data.simple.SimpleFeatureCollection;
|
||||
import org.geotools.data.simple.SimpleFeatureIterator;
|
||||
import org.geotools.data.simple.SimpleFeatureSource;
|
||||
import org.geotools.factory.CommonFactoryFinder;
|
||||
import org.geotools.factory.GeoTools;
|
||||
import org.geotools.feature.FeatureCollection;
|
||||
import org.opengis.feature.simple.SimpleFeature;
|
||||
import org.opengis.feature.simple.SimpleFeatureType;
|
||||
import org.opengis.filter.Filter;
|
||||
|
@ -57,6 +57,7 @@ import com.vividsolutions.jts.geom.Point;
|
|||
* Feb 22, 2013 #1641 randerso Added checks for using ID as label or shading attribute
|
||||
* Jul 24, 2014 #1908 randerso Removed debug sysouts
|
||||
* Feb 18, 2014 #2819 randerso Removed unnecessary clones of geometries
|
||||
* Mar 11, 2014 #2718 randerso Changes for GeoTools 10.5
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -206,8 +207,8 @@ class ReloadJob extends Job {
|
|||
// System.out.println("Processing request: " + req.number);
|
||||
|
||||
Result result = new Result();
|
||||
FeatureCollection<SimpleFeatureType, SimpleFeature> featureCollection = null;
|
||||
Iterator<SimpleFeature> featureIterator = null;
|
||||
SimpleFeatureCollection featureCollection = null;
|
||||
SimpleFeatureIterator featureIterator = null;
|
||||
try {
|
||||
if (pendingRequest != null) {
|
||||
// System.out.println("Canceling request: " + req.number);
|
||||
|
@ -262,7 +263,7 @@ class ReloadJob extends Job {
|
|||
String shapeField = schema.getGeometryDescriptor()
|
||||
.getLocalName();
|
||||
|
||||
DefaultQuery query = new DefaultQuery();
|
||||
Query query = new Query();
|
||||
|
||||
String typeName = req.rsc.getTypeName();
|
||||
query.setTypeName(typeName);
|
||||
|
@ -285,11 +286,11 @@ class ReloadJob extends Job {
|
|||
query.setFilter(ff.or(filterList));
|
||||
}
|
||||
|
||||
FeatureSource<SimpleFeatureType, SimpleFeature> featureSource = req.rsc
|
||||
.getDataStore().getFeatureSource(typeName);
|
||||
SimpleFeatureSource featureSource = req.rsc.getDataStore()
|
||||
.getFeatureSource(typeName);
|
||||
|
||||
featureCollection = featureSource.getFeatures(query);
|
||||
featureIterator = featureCollection.iterator();
|
||||
featureIterator = featureCollection.features();
|
||||
|
||||
// TODO: do we need to implement the GeometryCache/gidMap
|
||||
// stuff like in DbMapResource?
|
||||
|
@ -467,7 +468,7 @@ class ReloadJob extends Job {
|
|||
result.cause = e;
|
||||
} finally {
|
||||
if (featureIterator != null) {
|
||||
featureCollection.close(featureIterator);
|
||||
featureIterator.close();
|
||||
}
|
||||
if (result != null) {
|
||||
// System.out.println("Completed request: " + req.number);
|
||||
|
|
|
@ -1,212 +0,0 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.viz.core.spatial;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.geotools.data.DefaultQuery;
|
||||
import org.geotools.data.shapefile.indexed.IndexType;
|
||||
import org.geotools.data.shapefile.indexed.IndexedShapefileDataStore;
|
||||
import org.geotools.factory.CommonFactoryFinder;
|
||||
import org.geotools.factory.GeoTools;
|
||||
import org.geotools.feature.FeatureIterator;
|
||||
import org.geotools.geometry.jts.ReferencedEnvelope;
|
||||
import org.opengis.feature.simple.SimpleFeature;
|
||||
import org.opengis.feature.type.AttributeDescriptor;
|
||||
import org.opengis.filter.Filter;
|
||||
import org.opengis.filter.FilterFactory2;
|
||||
|
||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
|
||||
import com.raytheon.uf.common.geospatial.AbstractSpatialQuery;
|
||||
import com.raytheon.uf.common.geospatial.MapUtil;
|
||||
import com.raytheon.uf.common.geospatial.SpatialException;
|
||||
import com.raytheon.uf.common.geospatial.SpatialQueryResult;
|
||||
import com.raytheon.uf.common.localization.LocalizationFile;
|
||||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
import com.raytheon.uf.common.util.FileUtil;
|
||||
import com.raytheon.uf.viz.core.VizApp;
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
|
||||
/**
|
||||
* ShapefileQuery
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 15, 2007 chammack Initial Creation.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author chammack
|
||||
* @version 1
|
||||
*/
|
||||
public class ShapefileQuery extends AbstractSpatialQuery {
|
||||
|
||||
protected ShapefileQuery() {
|
||||
|
||||
}
|
||||
|
||||
private SpatialQueryResult[] wrap(List<SimpleFeature> features) {
|
||||
SpatialQueryResult[] results = new SpatialQueryResult[features.size()];
|
||||
|
||||
for (int i = 0; i < results.length; i++) {
|
||||
SimpleFeature f = features.get(i);
|
||||
results[i] = new SpatialQueryResult();
|
||||
results[i].geometry = (Geometry) f.getDefaultGeometry();
|
||||
results[i].attributes = new HashMap<String, Object>();
|
||||
|
||||
List<AttributeDescriptor> types = f.getFeatureType()
|
||||
.getAttributeDescriptors();
|
||||
|
||||
for (int k = 0; k < types.size(); k++) {
|
||||
String name = types.get(k).getLocalName();
|
||||
Object value = f.getAttribute(k);
|
||||
results[i].attributes.put(name, value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return results;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] dbRequest(String sql, String dbname)
|
||||
throws SpatialException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpatialQueryResult[] query(String dataSet, String theGeomField,
|
||||
String[] attributes, Geometry areaGeometry,
|
||||
Map<String, RequestConstraint> filter, SearchMode mode)
|
||||
throws SpatialException {
|
||||
File shapeFile = null;
|
||||
LocalizationFile[] files = PathManagerFactory.getPathManager()
|
||||
.listStaticFiles(FileUtil.join(VizApp.getMapsDir(), dataSet),
|
||||
null, false, true);
|
||||
for (LocalizationFile file : files) {
|
||||
File f = file.getFile();
|
||||
if (f.getName().endsWith(".shp")) {
|
||||
shapeFile = f;
|
||||
// we don't break so we make sure all needed shapefiles are
|
||||
// downloaded
|
||||
}
|
||||
}
|
||||
|
||||
if (shapeFile == null) {
|
||||
throw new SpatialException("Shapefile Not Found: " + dataSet);
|
||||
}
|
||||
|
||||
FeatureIterator<SimpleFeature> featureIterator = null;
|
||||
try {
|
||||
IndexedShapefileDataStore ds = new IndexedShapefileDataStore(
|
||||
shapeFile.toURI().toURL(), null, true, true, IndexType.QIX);
|
||||
|
||||
String[] types = ds.getTypeNames();
|
||||
|
||||
DefaultQuery query = new DefaultQuery();
|
||||
query.setTypeName(types[0]);
|
||||
|
||||
FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(GeoTools
|
||||
.getDefaultHints());
|
||||
|
||||
Filter shpFilter = null;
|
||||
if (areaGeometry != null) {
|
||||
ReferencedEnvelope bbox = new ReferencedEnvelope(
|
||||
areaGeometry.getEnvelopeInternal(),
|
||||
MapUtil.LATLON_PROJECTION);
|
||||
|
||||
shpFilter = ff.bbox(ff.property(theGeomField), bbox);
|
||||
}
|
||||
if (filter != null) {
|
||||
Set<String> keySet = filter.keySet();
|
||||
for (String key : keySet) {
|
||||
RequestConstraint constraint = filter.get(key);
|
||||
Filter compare = null;
|
||||
switch (constraint.getConstraintType()) {
|
||||
case EQUALS: {
|
||||
compare = ff.equal(ff.property(key),
|
||||
ff.literal(constraint.getConstraintValue()),
|
||||
false);
|
||||
break;
|
||||
}
|
||||
case NOT_EQUALS: {
|
||||
compare = ff.notEqual(ff.property(key),
|
||||
ff.literal(constraint.getConstraintValue()),
|
||||
false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (shpFilter == null) {
|
||||
shpFilter = compare;
|
||||
} else {
|
||||
shpFilter = ff.and(shpFilter, compare);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query.setFilter(shpFilter);
|
||||
|
||||
featureIterator = ds.getFeatureSource().getFeatures(query)
|
||||
.features();
|
||||
|
||||
List<SimpleFeature> featureList = new ArrayList<SimpleFeature>();
|
||||
while (featureIterator.hasNext()) {
|
||||
SimpleFeature feature = featureIterator.next();
|
||||
Geometry geometry = (Geometry) feature.getDefaultGeometry();
|
||||
if (areaGeometry == null
|
||||
|| (mode == SearchMode.CONTAINS && areaGeometry
|
||||
.contains(geometry))) {
|
||||
featureList.add(feature);
|
||||
} else if (mode == SearchMode.INTERSECTS
|
||||
&& areaGeometry.intersects(geometry)) {
|
||||
featureList.add(feature);
|
||||
}
|
||||
}
|
||||
|
||||
return wrap(featureList);
|
||||
} catch (Exception e) {
|
||||
throw new SpatialException("Error Querying Shapefile", e);
|
||||
} finally {
|
||||
if (featureIterator != null) {
|
||||
featureIterator.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpatialQueryResult[] query(String dataSet, String theGeomField,
|
||||
String[] attributes, Geometry areaGeometry,
|
||||
Map<String, RequestConstraint> filter, SearchMode mode,
|
||||
Integer limit) throws SpatialException {
|
||||
// not implemented
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -41,6 +41,7 @@ import org.geotools.coverage.grid.GridEnvelope2D;
|
|||
import org.geotools.coverage.grid.GridGeometry2D;
|
||||
import org.geotools.geometry.DirectPosition2D;
|
||||
import org.geotools.geometry.Envelope2D;
|
||||
import org.opengis.geometry.DirectPosition;
|
||||
import org.opengis.referencing.FactoryException;
|
||||
import org.opengis.referencing.crs.CoordinateReferenceSystem;
|
||||
import org.opengis.referencing.operation.MathTransform;
|
||||
|
@ -94,6 +95,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Aug 19, 2011 bsteffen Initial creation
|
||||
* Jun 07, 2013 2070 bsteffen Add geospatial constraints to metar
|
||||
* precip requests.
|
||||
* Mar 11, 2014 #2718 randerso Changes for GeoTools 10.5
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -197,8 +199,8 @@ public class MetarPrecipResource extends
|
|||
|
||||
IExtent extent = paintProps.getView().getExtent();
|
||||
|
||||
double threshold = PLOT_PIXEL_SIZE * magnification / density;
|
||||
threshold = threshold * extent.getWidth()
|
||||
double threshold = (PLOT_PIXEL_SIZE * magnification) / density;
|
||||
threshold = (threshold * extent.getWidth())
|
||||
/ paintProps.getCanvasBounds().width;
|
||||
|
||||
for (RenderablePrecipData data : precips) {
|
||||
|
@ -294,7 +296,7 @@ public class MetarPrecipResource extends
|
|||
List<RenderablePrecipData> precips = getPrecipData(descriptor
|
||||
.getTimeForResource(this));
|
||||
|
||||
if (precips == null || precips.isEmpty()) {
|
||||
if ((precips == null) || precips.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -401,7 +403,7 @@ public class MetarPrecipResource extends
|
|||
.doubleValue();
|
||||
DirectPosition2D dp = new DirectPosition2D(lon, lat);
|
||||
toDescriptor.transform(dp, dp);
|
||||
if (envelope.contains(dp)) {
|
||||
if (envelope.contains((DirectPosition) dp)) {
|
||||
newStations.add(map.get("location.stationId").toString());
|
||||
long validTime = pdo.getDataTime().getMatchValid();
|
||||
if (validTime < earliestTime) {
|
||||
|
@ -481,7 +483,7 @@ public class MetarPrecipResource extends
|
|||
int curIndex = frameInfo.getFrameIndex();
|
||||
int count = frameInfo.getFrameCount();
|
||||
// This will generate the number series 0, -1, 1, -2, 2, -3, 3...
|
||||
for (int i = 0; i < count / 2 + 1; i = i < 0 ? -i : -i - 1) {
|
||||
for (int i = 0; i < ((count / 2) + 1); i = i < 0 ? -i : -i - 1) {
|
||||
int index = (count + curIndex + i) % count;
|
||||
DataTime next = times[index];
|
||||
if (next != null) {
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -1,28 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.raytheon.viz.shapefile</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -1,7 +0,0 @@
|
|||
#Thu Mar 26 11:04:31 CDT 2009
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
|
@ -1,19 +0,0 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Shapefile Plug-in
|
||||
Bundle-SymbolicName: com.raytheon.viz.shapefile;singleton:=true
|
||||
Bundle-Version: 1.12.1174.qualifier
|
||||
Bundle-Activator: com.raytheon.viz.shapefile.rsc.Activator
|
||||
Bundle-Vendor: Raytheon
|
||||
Eclipse-RegisterBuddy: com.raytheon.viz.core, com.raytheon.viz.ui
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.core.runtime,
|
||||
org.geotools,
|
||||
com.raytheon.viz.core,
|
||||
com.raytheon.viz.ui,
|
||||
org.apache.commons.lang,
|
||||
com.raytheon.uf.viz.core.maps;bundle-version="1.0.0"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Export-Package: com.raytheon.viz.shapefile.rsc,
|
||||
com.raytheon.viz.shapefile.wizard
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
|
@ -1,5 +0,0 @@
|
|||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
plugin.xml
|
|
@ -1,62 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
This_software_was_developed_and_/_or_modified_by_Raytheon_Company,
|
||||
pursuant_to_Contract_DG133W-05-CQ-1067_with_the_US_Government.
|
||||
|
||||
U.S._EXPORT_CONTROLLED_TECHNICAL_DATA
|
||||
This_software_product_contains_export-restricted_data_whose
|
||||
export/transfer/disclosure_is_restricted_by_U.S._law._Dissemination
|
||||
to_non-U.S._persons_whether_in_the_United_States_or_abroad_requires
|
||||
an_export_license_or_other_authorization.
|
||||
|
||||
Contractor_Name:________Raytheon_Company
|
||||
Contractor_Address:_____6825_Pine_Street,_Suite_340
|
||||
________________________Mail_Stop_B8
|
||||
________________________Omaha,_NE_68106
|
||||
________________________402.291.0100
|
||||
|
||||
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
|
||||
further_licensing_information.
|
||||
-->
|
||||
<?eclipse version="3.2"?>
|
||||
<plugin>
|
||||
<extension
|
||||
point="com.raytheon.uf.viz.core.resource">
|
||||
<resource
|
||||
class="com.raytheon.viz.shapefile.rsc.ShapefileResource"
|
||||
name="ShapefileResource"
|
||||
renderingOrderId="MAP_OUTLINE">
|
||||
<fileType
|
||||
fileExtension="shp"
|
||||
name="Shapefile"/>
|
||||
</resource>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.commands">
|
||||
<command
|
||||
id="com.raytheon.viz.shapefile.shapefileImport"
|
||||
name="Shapefile Import">
|
||||
</command>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.handlers">
|
||||
<handler
|
||||
class="com.raytheon.viz.shapefile.action.ShapefileImportAction"
|
||||
commandId="com.raytheon.viz.shapefile.shapefileImport">
|
||||
</handler>
|
||||
</extension>
|
||||
<!--
|
||||
<extension
|
||||
point="org.eclipse.ui.menus">
|
||||
<menuContribution
|
||||
locationURI="menu:import">
|
||||
<command
|
||||
commandId="com.raytheon.viz.shapefile.shapefileImport"
|
||||
label="Shapefile..."
|
||||
style="push">
|
||||
</command>
|
||||
</menuContribution>
|
||||
</extension>
|
||||
-->
|
||||
|
||||
</plugin>
|
|
@ -1,69 +0,0 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package com.raytheon.viz.shapefile.action;
|
||||
|
||||
import org.eclipse.core.commands.AbstractHandler;
|
||||
import org.eclipse.core.commands.ExecutionEvent;
|
||||
import org.eclipse.core.commands.ExecutionException;
|
||||
import org.eclipse.jface.wizard.WizardDialog;
|
||||
|
||||
import com.raytheon.viz.shapefile.wizard.ShapefileWizard;
|
||||
import com.raytheon.viz.ui.VizWorkbenchManager;
|
||||
|
||||
/**
|
||||
* Import a shapefile, using the shapefile wizard
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 7/1/06 chammack Initial Creation.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author chammack
|
||||
* @version 1
|
||||
*/
|
||||
public class ShapefileImportAction extends AbstractHandler {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands
|
||||
* .ExecutionEvent)
|
||||
*/
|
||||
@Override
|
||||
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||
ShapefileWizard wizard = new ShapefileWizard();
|
||||
WizardDialog dialog = new WizardDialog(VizWorkbenchManager
|
||||
.getInstance().getCurrentWindow().getShell(), wizard);
|
||||
dialog.create();
|
||||
dialog.open();
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.viz.shapefile.rsc;
|
||||
|
||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
/**
|
||||
* The activator class controls the plug-in life cycle
|
||||
*/
|
||||
public class Activator extends AbstractUIPlugin {
|
||||
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "com.raytheon.viz.shapefile.rsc";
|
||||
|
||||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
*/
|
||||
public Activator() {
|
||||
plugin = this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void start(BundleContext context) throws Exception {
|
||||
super.start(context);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
plugin = null;
|
||||
super.stop(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the shared instance
|
||||
*
|
||||
* @return the shared instance
|
||||
*/
|
||||
public static Activator getDefault() {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,991 +0,0 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
|
||||
package com.raytheon.viz.shapefile.rsc;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.geotools.coverage.grid.GeneralGridGeometry;
|
||||
import org.geotools.data.DefaultQuery;
|
||||
import org.geotools.data.shapefile.ShapefileDataStore;
|
||||
import org.geotools.data.shapefile.indexed.IndexType;
|
||||
import org.geotools.data.shapefile.indexed.IndexedShapefileDataStore;
|
||||
import org.geotools.factory.CommonFactoryFinder;
|
||||
import org.geotools.factory.GeoTools;
|
||||
import org.geotools.feature.FeatureIterator;
|
||||
import org.geotools.geometry.jts.ReferencedEnvelope;
|
||||
import org.opengis.feature.IllegalAttributeException;
|
||||
import org.opengis.feature.simple.SimpleFeature;
|
||||
import org.opengis.filter.Filter;
|
||||
import org.opengis.filter.FilterFactory2;
|
||||
import org.opengis.filter.expression.Expression;
|
||||
import org.opengis.referencing.crs.CoordinateReferenceSystem;
|
||||
|
||||
import com.raytheon.uf.common.geospatial.MapUtil;
|
||||
import com.raytheon.uf.common.geospatial.ReferencedCoordinate;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget.HorizontalAlignment;
|
||||
import com.raytheon.uf.viz.core.PixelExtent;
|
||||
import com.raytheon.uf.viz.core.datastructure.WireframeCache;
|
||||
import com.raytheon.uf.viz.core.drawables.IFont;
|
||||
import com.raytheon.uf.viz.core.drawables.IShadedShape;
|
||||
import com.raytheon.uf.viz.core.drawables.IWireframeShape;
|
||||
import com.raytheon.uf.viz.core.drawables.PaintProperties;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.map.MapDescriptor;
|
||||
import com.raytheon.uf.viz.core.maps.rsc.AbstractMapResource;
|
||||
import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
||||
import com.raytheon.uf.viz.core.rsc.capabilities.ColorableCapability;
|
||||
import com.raytheon.uf.viz.core.rsc.capabilities.LabelableCapability;
|
||||
import com.raytheon.uf.viz.core.rsc.capabilities.OutlineCapability;
|
||||
import com.raytheon.uf.viz.core.rsc.capabilities.ShadeableCapability;
|
||||
import com.raytheon.viz.core.rsc.jts.JTSCompiler;
|
||||
import com.vividsolutions.jts.geom.Coordinate;
|
||||
import com.vividsolutions.jts.geom.Envelope;
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
import com.vividsolutions.jts.geom.GeometryFactory;
|
||||
import com.vividsolutions.jts.geom.MultiPoint;
|
||||
import com.vividsolutions.jts.geom.Point;
|
||||
import com.vividsolutions.jts.geom.Polygonal;
|
||||
import com.vividsolutions.jts.index.strtree.STRtree;
|
||||
|
||||
/**
|
||||
* Shapefile resource
|
||||
*
|
||||
* Provides shapefile rendering support
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 7/1/06 chammack Initial Creation.
|
||||
* 02/11/09 njensen Refactored to new rsc architecture
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author chammack
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ShapefileResource extends
|
||||
AbstractMapResource<ShapefileResourceData, MapDescriptor> {
|
||||
|
||||
protected ShapefileResource(ShapefileResourceData resourceData,
|
||||
LoadProperties props) {
|
||||
super(resourceData, props);
|
||||
}
|
||||
|
||||
protected static final double INQUIRY_TOLERANCE = 0.001;
|
||||
|
||||
protected static final double POINT_INQUIRY_TOLERANCE = 0.01;
|
||||
|
||||
protected String shapeField = null;
|
||||
|
||||
protected IndexedShapefileDataStore dataStore;
|
||||
|
||||
protected GeneralGridGeometry initializedGridGeometry;
|
||||
|
||||
protected IWireframeShape outlineShape;
|
||||
|
||||
protected IShadedShape shadedShape;
|
||||
|
||||
protected Map<Object, RGB> colorMap;
|
||||
|
||||
protected boolean isShadedCalculated;
|
||||
|
||||
protected String colorMapAttribute;
|
||||
|
||||
protected float simplificationLevel;
|
||||
|
||||
protected String[] theShapefileAttributes;
|
||||
|
||||
protected boolean isRegularPolygon;
|
||||
|
||||
protected boolean isSpatiallySplit;
|
||||
|
||||
protected STRtree rTree;
|
||||
|
||||
protected IGraphicsTarget lastTarget;
|
||||
|
||||
protected IFont font;
|
||||
|
||||
private static final int MAX_DISPLAYED_LABELS = 150;
|
||||
|
||||
protected class LabelNode {
|
||||
public String label;
|
||||
|
||||
public Coordinate c;
|
||||
}
|
||||
|
||||
/** *********************** Move colormaps to better location **** */
|
||||
static final int[] rgbRed = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 23, 39, 55, 71, 87, 103, 119, 135,
|
||||
151, 167, 183, 199, 215, 231, 247, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 246, 228, 211,
|
||||
193, 175, 158, 140 };
|
||||
|
||||
static final int[] rgbGreen = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 27, 43, 59,
|
||||
75, 91, 107, 123, 139, 155, 171, 187, 203, 219, 235, 251, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 247, 231, 215, 199, 183, 167, 151, 135, 119, 103, 87, 71, 55,
|
||||
39, 23, 7, 0, 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
static final int[] rgbBlue = { 0, 143, 159, 175, 191, 207, 223, 239, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 247, 231, 215, 199, 183, 167, 151, 135, 119, 103,
|
||||
87, 71, 55, 39, 23, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @seecom.raytheon.viz.core.rsc.IVizResource#init(com.raytheon.viz.core.
|
||||
* IGraphicsTarget)
|
||||
*/
|
||||
@Override
|
||||
protected void initInternal(IGraphicsTarget target) throws VizException {
|
||||
super.initInternal(target);
|
||||
getCapability(LabelableCapability.class).setAvailableLabelFields(
|
||||
resourceData.getLabelFields());
|
||||
|
||||
loadSDS();
|
||||
|
||||
if (colorMapAttribute != null) {
|
||||
getCapability(ShadeableCapability.class).setShadingField(
|
||||
colorMapAttribute);
|
||||
} else {
|
||||
colorMapAttribute = getCapability(ShadeableCapability.class)
|
||||
.getShadingField();
|
||||
}
|
||||
if (colorMapAttribute != null) {
|
||||
getCapability(ShadeableCapability.class).setAvailableShadingFields(
|
||||
new String[] { colorMapAttribute });
|
||||
} else {
|
||||
getCapability(ShadeableCapability.class).setAvailableShadingFields(
|
||||
new String[] {});
|
||||
}
|
||||
if (this.colorMapAttribute != null && this.colorMap == null) {
|
||||
generateUniqueColorMap(colorMapAttribute);
|
||||
}
|
||||
|
||||
IWireframeShape cachedShape = WireframeCache.getInstance()
|
||||
.checkWireframe(resourceData.getFilename(),
|
||||
descriptor.getGridGeometry());
|
||||
if (cachedShape != null) {
|
||||
this.outlineShape = cachedShape;
|
||||
} else {
|
||||
long t0 = System.currentTimeMillis();
|
||||
if (simplificationLevel > 0.0f) {
|
||||
|
||||
outlineShape = target.createWireframeShape(false, descriptor,
|
||||
0.0f, isSpatiallySplit, new PixelExtent(descriptor
|
||||
.getGridGeometry().getGridRange().getLow(0),
|
||||
descriptor.getGridGeometry().getGridRange()
|
||||
.getHigh(0), descriptor
|
||||
.getGridGeometry().getGridRange()
|
||||
.getLow(1), descriptor
|
||||
.getGridGeometry().getGridRange()
|
||||
.getHigh(1)));
|
||||
} else {
|
||||
outlineShape = target.createWireframeShape(false, descriptor);
|
||||
}
|
||||
|
||||
shadedShape = target.createShadedShape(false, descriptor,
|
||||
!isRegularPolygon);
|
||||
|
||||
loadShp();
|
||||
|
||||
WireframeCache.getInstance().registerWireframe(
|
||||
resourceData.getFilename(), descriptor.getGridGeometry(),
|
||||
this.outlineShape);
|
||||
System.out.println("Shapefile load took: "
|
||||
+ (System.currentTimeMillis() - t0) + "ms");
|
||||
}
|
||||
|
||||
this.initializedGridGeometry = this.descriptor.getGridGeometry();
|
||||
this.lastTarget = target;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.core.rsc.IVizResource#isApplicable(com.raytheon.viz.
|
||||
* core.PixelExtent)
|
||||
*/
|
||||
public boolean isApplicable(PixelExtent extent) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @seecom.raytheon.viz.core.rsc.IVizResource#paint(com.raytheon.viz.core.
|
||||
* IGraphicsTarget, com.raytheon.viz.core.PixelExtent, double, float)
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void paintInternal(IGraphicsTarget aTarget,
|
||||
PaintProperties paintProps) throws VizException {
|
||||
float alpha = paintProps.getAlpha();
|
||||
|
||||
if (isShadedCalculated
|
||||
&& getCapability(ShadeableCapability.class).getShadingField() != null
|
||||
&& shadedShape != null && shadedShape.isDrawable()) {
|
||||
float opacity = getCapability(ShadeableCapability.class)
|
||||
.getOpacity();
|
||||
aTarget.drawShadedShape(shadedShape, alpha * opacity);
|
||||
}
|
||||
|
||||
if (getCapability(OutlineCapability.class).isOutlineOn()
|
||||
&& outlineShape != null && outlineShape.isDrawable()) {
|
||||
aTarget.drawWireframeShape(outlineShape,
|
||||
getCapability(ColorableCapability.class).getColor(),
|
||||
getCapability(OutlineCapability.class).getOutlineWidth(),
|
||||
getCapability(OutlineCapability.class).getLineStyle(),
|
||||
alpha);
|
||||
}
|
||||
|
||||
if (getCapability(LabelableCapability.class).getLabelField() != null
|
||||
&& this.rTree != null && this.rTree.size() > 0) {
|
||||
|
||||
Envelope env = this.descriptor.pixelToWorld(paintProps.getView()
|
||||
.getExtent());
|
||||
|
||||
List<LabelNode> results = this.rTree.query(env);
|
||||
|
||||
if (results.size() < MAX_DISPLAYED_LABELS) {
|
||||
if (font == null) {
|
||||
font = aTarget.initializeFont(aTarget.getDefaultFont()
|
||||
.getFontName(), 10, null);
|
||||
}
|
||||
|
||||
double screenToWorldRatio = paintProps.getCanvasBounds().width
|
||||
/ paintProps.getView().getExtent().getWidth();
|
||||
|
||||
for (LabelNode n : results) {
|
||||
double[] pixel = descriptor.worldToPixel(new double[] {
|
||||
n.c.x, n.c.y });
|
||||
if (pixel == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
double offsetX = getCapability(LabelableCapability.class)
|
||||
.getxOffset() / screenToWorldRatio;
|
||||
double offsetY = getCapability(LabelableCapability.class)
|
||||
.getyOffset() / screenToWorldRatio;
|
||||
|
||||
aTarget.drawString(
|
||||
font,
|
||||
n.label,
|
||||
pixel[0] + offsetX,
|
||||
pixel[1] + offsetY,
|
||||
0.0,
|
||||
IGraphicsTarget.TextStyle.NORMAL,
|
||||
getCapability(ColorableCapability.class).getColor(),
|
||||
HorizontalAlignment.CENTER, null);
|
||||
|
||||
}
|
||||
font.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void loadSDS() throws VizException {
|
||||
try {
|
||||
File file = resourceData.getShapeFile();
|
||||
|
||||
// Use GRX -- RTree index
|
||||
// takes longer to build initially, but faster queries than QuadTree
|
||||
|
||||
dataStore = new IndexedShapefileDataStore(file.toURI().toURL(),
|
||||
null, false, true, IndexType.QIX);
|
||||
|
||||
theShapefileAttributes = ShapefileUtil.getAttributes(dataStore,
|
||||
true);
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new VizException("Error loading shapefile: ", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void loadShp() throws VizException {
|
||||
|
||||
// use a temporary tree until it's built
|
||||
STRtree rTree = new STRtree();
|
||||
|
||||
FeatureIterator<SimpleFeature> featureIterator = null;
|
||||
try {
|
||||
|
||||
// TODO: pass the crs on to JTSCompiler to indicate projection of
|
||||
// shapefile data.
|
||||
CoordinateReferenceSystem crs = dataStore.getFeatureSource()
|
||||
.getSchema().getGeometryDescriptor()
|
||||
.getCoordinateReferenceSystem();
|
||||
|
||||
shapeField = dataStore.getFeatureSource().getSchema()
|
||||
.getGeometryDescriptor().getLocalName();
|
||||
|
||||
String[] types = dataStore.getTypeNames();
|
||||
|
||||
DefaultQuery query = new DefaultQuery();
|
||||
|
||||
query.setTypeName(types[0]);
|
||||
|
||||
if (isShadedCalculated) {
|
||||
Set<String> valSet = new HashSet<String>();
|
||||
valSet.add(resourceData.getLabelFields()[0]);
|
||||
valSet.add(colorMapAttribute);
|
||||
valSet.add(shapeField);
|
||||
query.setPropertyNames(valSet.toArray(new String[valSet.size()]));
|
||||
} else {
|
||||
query.setPropertyNames(new String[] {
|
||||
resourceData.getLabelFields()[0], shapeField });
|
||||
}
|
||||
|
||||
featureIterator = dataStore.getFeatureSource().getFeatures(query)
|
||||
.features();
|
||||
|
||||
JTSCompiler jtsCompiler = new JTSCompiler(shadedShape,
|
||||
outlineShape, descriptor);
|
||||
|
||||
StringBuffer sb = new StringBuffer();
|
||||
|
||||
while (featureIterator.hasNext()) {
|
||||
SimpleFeature f = featureIterator.next();
|
||||
Geometry o = (Geometry) f.getDefaultGeometry();
|
||||
sb.setLength(0);
|
||||
|
||||
Point center = o.getCentroid();
|
||||
if (resourceData.getLabelFields() != null) {
|
||||
|
||||
sb.append(f.getAttribute(0));
|
||||
|
||||
}
|
||||
|
||||
LabelNode node = new LabelNode();
|
||||
node.c = center.getCoordinate();
|
||||
node.label = sb.toString();
|
||||
|
||||
rTree.insert(new Envelope(center.getCoordinate()), node);
|
||||
|
||||
RGB color = null;
|
||||
|
||||
if (isShadedCalculated) {
|
||||
Object attrib = f.getAttribute(0);
|
||||
color = colorMap.get(attrib);
|
||||
}
|
||||
try {
|
||||
jtsCompiler.handle(o, color);
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
rTree.build();
|
||||
|
||||
// assign into the rTree attribute for use by the paint method
|
||||
// don't do this until after finished inserting or the next insert
|
||||
// after a paint call will fail
|
||||
this.rTree = rTree;
|
||||
|
||||
outlineShape.compile();
|
||||
|
||||
if (isShadedCalculated) {
|
||||
shadedShape.compile();
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new VizException("Error reading shapefile "
|
||||
+ resourceData.getFilename().toString() + "", e);
|
||||
} finally {
|
||||
if (featureIterator != null) {
|
||||
featureIterator.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> interrogate(ReferencedCoordinate coord)
|
||||
throws VizException {
|
||||
Map<String, Object> retVal = new HashMap<String, Object>();
|
||||
FeatureIterator<SimpleFeature> featureIterator = null;
|
||||
|
||||
try {
|
||||
Coordinate latLon = coord.asLatLon();
|
||||
String[] types = dataStore.getTypeNames();
|
||||
|
||||
DefaultQuery query = new DefaultQuery();
|
||||
query.setTypeName(types[0]);
|
||||
query.setPropertyNames(theShapefileAttributes);
|
||||
|
||||
FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(GeoTools
|
||||
.getDefaultHints());
|
||||
ReferencedEnvelope bbox = new ReferencedEnvelope(latLon.x
|
||||
- INQUIRY_TOLERANCE, latLon.x + INQUIRY_TOLERANCE, latLon.y
|
||||
- INQUIRY_TOLERANCE, latLon.y + INQUIRY_TOLERANCE,
|
||||
MapUtil.LATLON_PROJECTION);
|
||||
Filter bboxFilter = ff.bbox(ff.property(shapeField), bbox);
|
||||
|
||||
query.setFilter(bboxFilter);
|
||||
featureIterator = dataStore.getFeatureSource().getFeatures(query)
|
||||
.features();
|
||||
|
||||
GeometryFactory gf = new GeometryFactory();
|
||||
boolean done = false;
|
||||
String geomName = dataStore.getSchema().getGeometryDescriptor()
|
||||
.getLocalName();
|
||||
Class<?> geomType = dataStore.getSchema().getGeometryDescriptor()
|
||||
.getType().getBinding();
|
||||
boolean pointType = false;
|
||||
if (geomType == Point.class || geomType == MultiPoint.class) {
|
||||
pointType = true;
|
||||
}
|
||||
|
||||
while (featureIterator.hasNext() && !done) {
|
||||
SimpleFeature f = featureIterator.next();
|
||||
|
||||
if (pointType == false
|
||||
&& !((Geometry) f.getDefaultGeometry()).intersects(gf
|
||||
.toGeometry(bbox))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (int k = 0; k < theShapefileAttributes.length; k++) {
|
||||
|
||||
if (!theShapefileAttributes[k].equals(geomName)) {
|
||||
retVal.put(theShapefileAttributes[k], f.getAttribute(k)
|
||||
.toString());
|
||||
}
|
||||
|
||||
}
|
||||
done = true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new VizException("Error interrogating resource: ", e);
|
||||
} finally {
|
||||
if (featureIterator != null) {
|
||||
featureIterator.close();
|
||||
}
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public String inspect(ReferencedCoordinate coord) throws VizException {
|
||||
FeatureIterator<SimpleFeature> featureIterator = null;
|
||||
|
||||
StringBuffer sb = new StringBuffer();
|
||||
try {
|
||||
Coordinate latLon = coord.asLatLon();
|
||||
String[] types = dataStore.getTypeNames();
|
||||
|
||||
DefaultQuery query = new DefaultQuery();
|
||||
query.setTypeName(types[0]);
|
||||
|
||||
String[] fields = new String[resourceData.getLabelFields().length + 1];
|
||||
System.arraycopy(resourceData.getLabelFields(), 0, fields, 0,
|
||||
resourceData.getLabelFields().length);
|
||||
fields[resourceData.getLabelFields().length] = shapeField;
|
||||
|
||||
query.setPropertyNames(fields);
|
||||
FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(GeoTools
|
||||
.getDefaultHints());
|
||||
Class geomType = dataStore.getSchema().getGeometryDescriptor()
|
||||
.getType().getBinding();
|
||||
boolean polygonal = Polygonal.class.isAssignableFrom(geomType);
|
||||
|
||||
GeometryFactory gf = new GeometryFactory();
|
||||
Point llPoint = gf.createPoint(latLon);
|
||||
Filter filter;
|
||||
if (polygonal) {
|
||||
filter = ff.contains(ff.property(shapeField),
|
||||
ff.literal(llPoint));
|
||||
} else {
|
||||
// TODO: make the box sized in screen pixels not degrees
|
||||
ReferencedEnvelope bbox = new ReferencedEnvelope(latLon.x
|
||||
- POINT_INQUIRY_TOLERANCE, latLon.x
|
||||
+ POINT_INQUIRY_TOLERANCE, latLon.y
|
||||
- POINT_INQUIRY_TOLERANCE, latLon.y
|
||||
+ POINT_INQUIRY_TOLERANCE, MapUtil.LATLON_PROJECTION);
|
||||
Geometry envelopeGeometry = gf.toGeometry(bbox);
|
||||
filter = ff.intersects(ff.literal(envelopeGeometry),
|
||||
ff.property(shapeField));
|
||||
// filter = ff.dwithin(ff.property(shapeField), ff
|
||||
// .literal(llPoint), 1.0, "km");
|
||||
}
|
||||
|
||||
query.setFilter(filter);
|
||||
featureIterator = dataStore.getFeatureSource().getFeatures(query)
|
||||
.features();
|
||||
|
||||
boolean done = false;
|
||||
while (featureIterator.hasNext() && !done) {
|
||||
SimpleFeature f = featureIterator.next();
|
||||
|
||||
for (int k = 0; k < resourceData.getLabelFields().length; k++) {
|
||||
|
||||
if (k != 0) {
|
||||
sb.append(" ");
|
||||
}
|
||||
String s = f.getAttribute(k).toString();
|
||||
sb.append(StringUtils.isBlank(s) ? "unknown" : s);
|
||||
|
||||
}
|
||||
done = true;
|
||||
}
|
||||
|
||||
} catch (Throwable e) {
|
||||
throw new VizException("Error inspecting resource: ", e);
|
||||
} finally {
|
||||
if (featureIterator != null) {
|
||||
featureIterator.close();
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
protected void useColorMap(int number, String attribute) {
|
||||
|
||||
colorMap = new HashMap<Object, RGB>();
|
||||
switch (number) {
|
||||
case -22:
|
||||
colorMap.put(-3, new RGB(0, 0, 0));
|
||||
colorMap.put(-2, new RGB(50, 79, 79));
|
||||
colorMap.put(-1, new RGB(0, 236, 236));
|
||||
colorMap.put(0, new RGB(1, 160, 246));
|
||||
colorMap.put(1, new RGB(0, 0, 246));
|
||||
colorMap.put(2, new RGB(0, 255, 0));
|
||||
colorMap.put(3, new RGB(0, 200, 0));
|
||||
colorMap.put(4, new RGB(0, 144, 0));
|
||||
colorMap.put(5, new RGB(255, 255, 0));
|
||||
colorMap.put(6, new RGB(231, 192, 0));
|
||||
colorMap.put(7, new RGB(255, 144, 0));
|
||||
colorMap.put(8, new RGB(255, 0, 0));
|
||||
colorMap.put(9, new RGB(214, 0, 0));
|
||||
colorMap.put(10, new RGB(192, 0, 0));
|
||||
colorMap.put(11, new RGB(255, 0, 255));
|
||||
colorMap.put(12, new RGB(153, 85, 201));
|
||||
colorMap.put(13, new RGB(235, 235, 235));
|
||||
break;
|
||||
}
|
||||
isShadedCalculated = true;
|
||||
getCapability(ShadeableCapability.class).setShadingField(attribute);
|
||||
colorMapAttribute = attribute;
|
||||
}
|
||||
|
||||
protected void generateUniqueColorMap(String attribute) throws VizException {
|
||||
|
||||
FeatureIterator<SimpleFeature> featureIterator = null;
|
||||
try {
|
||||
String[] types = dataStore.getTypeNames();
|
||||
DefaultQuery dq = new DefaultQuery();
|
||||
dq.setTypeName(types[0]);
|
||||
dq.setPropertyNames(new String[] { attribute });
|
||||
featureIterator = dataStore.getFeatureSource().getFeatures(dq)
|
||||
.features();
|
||||
|
||||
Random rand = new Random(System.currentTimeMillis());
|
||||
|
||||
colorMap = new HashMap<Object, RGB>();
|
||||
|
||||
while (featureIterator.hasNext()) {
|
||||
SimpleFeature f = featureIterator.next();
|
||||
Object attrib = f.getAttribute(0);
|
||||
RGB c = colorMap.get(attrib);
|
||||
if (c == null) {
|
||||
c = new RGB(rand.nextInt(255), rand.nextInt(255),
|
||||
rand.nextInt(255));
|
||||
colorMap.put(attrib, c);
|
||||
}
|
||||
}
|
||||
isShadedCalculated = true;
|
||||
getCapability(ShadeableCapability.class).setShadingField(attribute);
|
||||
colorMapAttribute = attribute;
|
||||
} catch (Exception e) {
|
||||
throw new VizException("Error generating colormap: ", e);
|
||||
} finally {
|
||||
if (featureIterator != null) {
|
||||
featureIterator.close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static HashMap<Object, RGB> generateRandomAttributeMap(
|
||||
String attribute, File theShape) throws VizException {
|
||||
FeatureIterator<SimpleFeature> featureIterator = null;
|
||||
try {
|
||||
|
||||
ShapefileDataStore theSDS = new ShapefileDataStore(theShape.toURI()
|
||||
.toURL(), null, true);
|
||||
|
||||
String[] types = theSDS.getTypeNames();
|
||||
DefaultQuery dq = new DefaultQuery();
|
||||
dq.setTypeName(types[0]);
|
||||
dq.setPropertyNames(new String[] { attribute });
|
||||
featureIterator = theSDS.getFeatureSource().getFeatures(dq)
|
||||
.features();
|
||||
|
||||
Random rand = new Random(System.currentTimeMillis());
|
||||
|
||||
HashMap<Object, RGB> theColorMap = new HashMap<Object, RGB>();
|
||||
|
||||
while (featureIterator.hasNext()) {
|
||||
SimpleFeature f = featureIterator.next();
|
||||
Object attrib = f.getAttribute(0);
|
||||
RGB c = theColorMap.get(attrib);
|
||||
if (c == null) {
|
||||
c = new RGB(rand.nextInt(255), rand.nextInt(255),
|
||||
rand.nextInt(255));
|
||||
theColorMap.put(attrib, c);
|
||||
}
|
||||
}
|
||||
|
||||
return theColorMap;
|
||||
} catch (Exception e) {
|
||||
throw new VizException("Error generating colormap: ", e);
|
||||
} finally {
|
||||
if (featureIterator != null) {
|
||||
featureIterator.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static HashMap<Object, RGB> generateRGBColorMap(String attribute,
|
||||
File theShape) throws VizException {
|
||||
FeatureIterator<SimpleFeature> featureIterator = null;
|
||||
try {
|
||||
|
||||
ShapefileDataStore theSDS = new ShapefileDataStore(theShape.toURI()
|
||||
.toURL(), null, true);
|
||||
|
||||
String[] types = theSDS.getTypeNames();
|
||||
DefaultQuery dq = new DefaultQuery();
|
||||
dq.setTypeName(types[0]);
|
||||
dq.setPropertyNames(new String[] { attribute });
|
||||
featureIterator = theSDS.getFeatureSource().getFeatures(dq)
|
||||
.features();
|
||||
|
||||
HashMap<Object, RGB> theColorMap = new HashMap<Object, RGB>();
|
||||
|
||||
// Calc max/min
|
||||
float max = Float.MIN_VALUE;
|
||||
float min = Float.MAX_VALUE;
|
||||
|
||||
while (featureIterator.hasNext()) {
|
||||
SimpleFeature f = featureIterator.next();
|
||||
float attrib;
|
||||
Object o = f.getAttribute(0);
|
||||
if (o instanceof String) {
|
||||
attrib = Float.parseFloat((String) o);
|
||||
} else {
|
||||
attrib = ((Number) o).floatValue();
|
||||
}
|
||||
if (max < attrib) {
|
||||
max = attrib;
|
||||
}
|
||||
|
||||
if (min > attrib) {
|
||||
min = attrib;
|
||||
}
|
||||
}
|
||||
|
||||
float diff = max - min;
|
||||
|
||||
// Second pass, assign colors
|
||||
featureIterator = theSDS.getFeatureSource().getFeatures(dq)
|
||||
.features();
|
||||
while (featureIterator.hasNext()) {
|
||||
SimpleFeature f = featureIterator.next();
|
||||
Object o = f.getAttribute(0);
|
||||
float attrib;
|
||||
if (o instanceof String) {
|
||||
attrib = Float.parseFloat((String) o);
|
||||
} else {
|
||||
attrib = ((Number) o).floatValue();
|
||||
}
|
||||
|
||||
RGB c = theColorMap.get(o);
|
||||
if (c == null) {
|
||||
int idx = (int) ((attrib - min) / diff * 63);
|
||||
c = new RGB(rgbRed[idx], rgbGreen[idx], rgbBlue[idx]);
|
||||
theColorMap.put(o, c);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return theColorMap;
|
||||
} catch (IOException e) {
|
||||
throw new VizException("Error generating colormap: ", e);
|
||||
} catch (IllegalAttributeException e) {
|
||||
throw new VizException("Error generating colormap: ", e);
|
||||
} finally {
|
||||
if (featureIterator != null) {
|
||||
featureIterator.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.viz.core.rsc.IVizResource#dispose()
|
||||
*/
|
||||
@Override
|
||||
protected void disposeInternal() {
|
||||
|
||||
WireframeCache.getInstance().unregisterWireframe(
|
||||
resourceData.getFilename(), descriptor.getGridGeometry());
|
||||
|
||||
if (shadedShape != null) {
|
||||
shadedShape.dispose();
|
||||
}
|
||||
shadedShape = null;
|
||||
|
||||
if (colorMap != null) {
|
||||
colorMap.clear();
|
||||
}
|
||||
|
||||
if (font != null) {
|
||||
font.dispose();
|
||||
}
|
||||
|
||||
lastTarget = null;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.core.rsc.IVizResource#getCoordinateReferenceSystem()
|
||||
*/
|
||||
public CoordinateReferenceSystem getCoordinateReferenceSystem() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.core.rsc.capabilities.IAnalyzableResource#intersection
|
||||
* (com.vividsolutions.jts.geom.Geometry)
|
||||
*/
|
||||
public Geometry intersection(Geometry geom) throws VizException {
|
||||
FeatureIterator<SimpleFeature> featureIterator = null;
|
||||
List<Geometry> geomList = new ArrayList<Geometry>();
|
||||
|
||||
try {
|
||||
|
||||
String[] types = dataStore.getTypeNames();
|
||||
|
||||
DefaultQuery query = new DefaultQuery();
|
||||
query.setTypeName(types[0]);
|
||||
|
||||
String[] fields = new String[resourceData.getLabelFields().length + 1];
|
||||
for (int i = 0; i < resourceData.getLabelFields().length; i++) {
|
||||
fields[i] = resourceData.getLabelFields()[i];
|
||||
}
|
||||
fields[resourceData.getLabelFields().length] = shapeField;
|
||||
|
||||
query.setPropertyNames(fields);
|
||||
FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(GeoTools
|
||||
.getDefaultHints());
|
||||
ReferencedEnvelope bbox = new ReferencedEnvelope(
|
||||
geom.getEnvelopeInternal(), MapUtil.LATLON_PROJECTION);
|
||||
Expression geometry = ff.property(shapeField);
|
||||
|
||||
Filter bboxFilter = ff.bbox(geometry, bbox);
|
||||
|
||||
query.setFilter(bboxFilter);
|
||||
featureIterator = dataStore.getFeatureSource().getFeatures(query)
|
||||
.features();
|
||||
|
||||
GeometryFactory gf = new GeometryFactory();
|
||||
|
||||
while (featureIterator.hasNext()) {
|
||||
SimpleFeature f = featureIterator.next();
|
||||
|
||||
Geometry g = (Geometry) f.getDefaultGeometry();
|
||||
if (!g.intersects(gf.toGeometry(bbox))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Geometry intersection = g.intersection(geom);
|
||||
geomList.add(intersection);
|
||||
}
|
||||
|
||||
if (geomList.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
if (geomList.size() == 1) {
|
||||
return geomList.get(0);
|
||||
}
|
||||
|
||||
Geometry[] geomArray = geomList.toArray(new Geometry[geomList
|
||||
.size()]);
|
||||
return gf.createGeometryCollection(geomArray);
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new VizException("Error inspecting resource: ", e);
|
||||
} finally {
|
||||
if (featureIterator != null) {
|
||||
featureIterator.close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.core.rsc.capabilities.IAnalyzableResource#union(com.
|
||||
* vividsolutions.jts.geom.Geometry)
|
||||
*/
|
||||
public Geometry union(Geometry geom) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the isRegularPolygon
|
||||
*/
|
||||
public boolean isRegularPolygon() {
|
||||
return isRegularPolygon;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the colorMap
|
||||
*/
|
||||
public Map<Object, RGB> getColorMap() {
|
||||
return colorMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param colorMap
|
||||
* the colorMap to set
|
||||
*/
|
||||
public void setColorMap(Map<Object, RGB> colorMap) {
|
||||
this.colorMap = colorMap;
|
||||
this.isShadedCalculated = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param colorMap
|
||||
* the colorMap to set
|
||||
*/
|
||||
public void setColorMapId(int colormapId) {
|
||||
useColorMap(colormapId, colorMapAttribute);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the colorMapAttribute
|
||||
*/
|
||||
public String getColorMapAttribute() {
|
||||
return colorMapAttribute;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param colorMapAttribute
|
||||
* the colorMapAttribute to set
|
||||
*/
|
||||
public void setColorMapAttribute(String colorMapAttribute)
|
||||
throws VizException {
|
||||
this.colorMapAttribute = colorMapAttribute;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the isSpatiallySplit
|
||||
*/
|
||||
public boolean isSpatiallySplit() {
|
||||
return isSpatiallySplit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param isSpatiallySplit
|
||||
* the isSpatiallySplit to set
|
||||
*/
|
||||
public void setSpatiallySplit(boolean isSpatiallySplit) {
|
||||
this.isSpatiallySplit = isSpatiallySplit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the simplificationLevel
|
||||
*/
|
||||
public float getSimplificationLevel() {
|
||||
return simplificationLevel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param simplificationLevel
|
||||
* the simplificationLevel to set
|
||||
*/
|
||||
public void setSimplificationLevel(float simplificationLevel) {
|
||||
this.simplificationLevel = simplificationLevel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param isRegularPolygon
|
||||
* the isRegularPolygon to set
|
||||
*/
|
||||
public void setRegularPolygon(boolean isRegularPolygon) {
|
||||
this.isRegularPolygon = isRegularPolygon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void project(CoordinateReferenceSystem mapData) throws VizException {
|
||||
|
||||
if (this.outlineShape != null) {
|
||||
WireframeCache.getInstance().unregisterWireframe(
|
||||
resourceData.getFilename(), initializedGridGeometry);
|
||||
|
||||
}
|
||||
if (this.shadedShape != null) {
|
||||
this.shadedShape.reset();
|
||||
this.shadedShape = null;
|
||||
}
|
||||
|
||||
this.initInternal(this.lastTarget);
|
||||
}
|
||||
|
||||
public IndexedShapefileDataStore getShapefileObject() {
|
||||
return dataStore;
|
||||
}
|
||||
}
|
|
@ -1,194 +0,0 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.viz.shapefile.rsc;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
|
||||
import com.raytheon.uf.viz.core.drawables.IDescriptor;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.rsc.AbstractNameGenerator;
|
||||
import com.raytheon.uf.viz.core.rsc.AbstractResourceData;
|
||||
import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
|
||||
import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
||||
import com.raytheon.uf.viz.core.rsc.capabilities.ColorableCapability;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 11, 2009 njensen Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author njensen
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
public class ShapefileResourceData extends AbstractResourceData {
|
||||
|
||||
private static final RGB COLOR = new RGB(155, 155, 155);
|
||||
|
||||
@XmlElement
|
||||
private String filename;
|
||||
|
||||
@XmlElement
|
||||
protected String[] labelFields;
|
||||
|
||||
/** The human readable name */
|
||||
@XmlElement
|
||||
private String mapName = null;
|
||||
|
||||
private File shapeFile;
|
||||
|
||||
public ShapefileResourceData() {
|
||||
super();
|
||||
this.nameGenerator = new AbstractNameGenerator() {
|
||||
|
||||
@Override
|
||||
public String getName(AbstractVizResource<?, ?> resource) {
|
||||
if (mapName != null) {
|
||||
return mapName;
|
||||
}
|
||||
|
||||
return filename;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
public ShapefileResourceData(String filename, String[] labelFields) {
|
||||
this();
|
||||
this.filename = filename;
|
||||
this.labelFields = labelFields;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.core.rsc.AbstractResourceData#construct(com.raytheon
|
||||
* .uf.viz.core.comm.LoadProperties,
|
||||
* com.raytheon.uf.viz.core.drawables.IDescriptor)
|
||||
*/
|
||||
@Override
|
||||
public ShapefileResource construct(LoadProperties loadProperties,
|
||||
IDescriptor descriptor) throws VizException {
|
||||
shapeFile = new File(filename);
|
||||
if (shapeFile == null || shapeFile.exists() == false) {
|
||||
throw new VizException("Could not find shapefile",
|
||||
new FileNotFoundException(String.valueOf(shapeFile)));
|
||||
}
|
||||
ShapefileResource rsc = new ShapefileResource(this, loadProperties);
|
||||
rsc.getCapability(ColorableCapability.class).setColor(COLOR);
|
||||
|
||||
return rsc;
|
||||
}
|
||||
|
||||
protected File getShapeFile() {
|
||||
return shapeFile;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.core.rsc.AbstractResourceData#update(java.lang.Object
|
||||
* )
|
||||
*/
|
||||
@Override
|
||||
public void update(Object updateData) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the filename
|
||||
*/
|
||||
public String getFilename() {
|
||||
return filename;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filename
|
||||
* the filename to set
|
||||
*/
|
||||
public void setFilename(String filename) {
|
||||
this.filename = filename;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the labelFields
|
||||
*/
|
||||
public String[] getLabelFields() {
|
||||
return labelFields;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param labelFields
|
||||
* the labelFields to set
|
||||
*/
|
||||
public void setLabelFields(String[] labelFields) {
|
||||
this.labelFields = labelFields;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null || obj instanceof ShapefileResourceData == false) {
|
||||
return false;
|
||||
}
|
||||
ShapefileResourceData other = (ShapefileResourceData) obj;
|
||||
|
||||
if (this.mapName != null && other.mapName == null) {
|
||||
return false;
|
||||
} else if (this.mapName == null && other.mapName != null) {
|
||||
return false;
|
||||
} else if (this.mapName != null
|
||||
&& this.mapName.equals(other.mapName) == false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.filename != null && other.filename == null) {
|
||||
return false;
|
||||
} else if (this.filename == null && other.filename != null) {
|
||||
return false;
|
||||
} else if (this.filename != null
|
||||
&& this.filename.equals(other.filename) == false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,95 +0,0 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.viz.shapefile.rsc;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.List;
|
||||
|
||||
import org.geotools.data.shapefile.indexed.IndexedShapefileDataStore;
|
||||
import org.opengis.feature.type.AttributeDescriptor;
|
||||
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 11, 2009 njensen Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author njensen
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class ShapefileUtil {
|
||||
|
||||
public static String[] getAttributes(File shapefile) throws VizException {
|
||||
return getAttributes(shapefile, true);
|
||||
}
|
||||
|
||||
public static String[] getAttributes(File aShapeFile,
|
||||
boolean includeGeometry) throws VizException {
|
||||
|
||||
try {
|
||||
IndexedShapefileDataStore ds = new IndexedShapefileDataStore(
|
||||
aShapeFile.toURI().toURL(), false, true);
|
||||
|
||||
return getAttributes(ds, includeGeometry);
|
||||
|
||||
} catch (MalformedURLException e) {
|
||||
throw new VizException("Bad file", e);
|
||||
} catch (IOException e) {
|
||||
throw new VizException("Error reading shapefile ", e);
|
||||
}
|
||||
}
|
||||
|
||||
public static String[] getAttributes(IndexedShapefileDataStore ds,
|
||||
boolean includeGeometry) throws IOException {
|
||||
String[] retVal = null;
|
||||
List<AttributeDescriptor> at = ds.getSchema().getAttributeDescriptors();
|
||||
if (at == null || at.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (includeGeometry) {
|
||||
retVal = new String[at.size()];
|
||||
} else {
|
||||
retVal = new String[at.size() - 1];
|
||||
}
|
||||
|
||||
int j = 0;
|
||||
|
||||
for (int i = 0; i < at.size(); i++) {
|
||||
if (includeGeometry || !at.get(i).getLocalName().equals("the_geom")) {
|
||||
retVal[j] = at.get(i).getLocalName();
|
||||
j++;
|
||||
}
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
/**
|
||||
* Shapefile support
|
||||
*/
|
||||
package com.raytheon.viz.shapefile.rsc;
|
|
@ -1,270 +0,0 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package com.raytheon.viz.shapefile.wizard;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.jface.wizard.Wizard;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.eclipse.ui.INewWizard;
|
||||
import org.eclipse.ui.IWorkbench;
|
||||
|
||||
import com.raytheon.uf.viz.core.IDisplayPaneContainer;
|
||||
import com.raytheon.uf.viz.core.drawables.IDescriptor;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
||||
import com.raytheon.uf.viz.core.rsc.capabilities.ColorableCapability;
|
||||
import com.raytheon.uf.viz.core.rsc.capabilities.ShadeableCapability;
|
||||
import com.raytheon.viz.shapefile.rsc.ShapefileResource;
|
||||
import com.raytheon.viz.shapefile.rsc.ShapefileResourceData;
|
||||
import com.raytheon.viz.ui.EditorUtil;
|
||||
|
||||
/**
|
||||
* Shapefile Wizard
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 7/1/06 chammack Initial Creation.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author chammack
|
||||
* @version 1
|
||||
*/
|
||||
public class ShapefileWizard extends Wizard implements INewWizard {
|
||||
|
||||
private String theShpFile;
|
||||
|
||||
private String theLabelAttribute;
|
||||
|
||||
private ShapefileWizardFilePage theFilePage;
|
||||
|
||||
private ShapefileWizardLayerPage theLayerPage;
|
||||
|
||||
private ShapefileWizardColorPage theColorPage;
|
||||
|
||||
private boolean isShaded;
|
||||
|
||||
private boolean isRegularPolygon;
|
||||
|
||||
private String theShadedAttribute;
|
||||
|
||||
private HashMap<Object, RGB> colorMap;
|
||||
|
||||
// private boolean isFinished;
|
||||
|
||||
public ShapefileWizard() {
|
||||
super();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.jface.wizard.Wizard#addPages()
|
||||
*/
|
||||
@Override
|
||||
public void addPages() {
|
||||
theFilePage = new ShapefileWizardFilePage();
|
||||
addPage(theFilePage);
|
||||
theLayerPage = new ShapefileWizardLayerPage();
|
||||
addPage(theLayerPage);
|
||||
theColorPage = new ShapefileWizardColorPage();
|
||||
addPage(theColorPage);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.jface.wizard.Wizard#performFinish()
|
||||
*/
|
||||
@Override
|
||||
public boolean performFinish() {
|
||||
Job j = new Job(theLabelAttribute) {
|
||||
|
||||
@Override
|
||||
protected IStatus run(IProgressMonitor anMonitor) {
|
||||
IDisplayPaneContainer editor = EditorUtil
|
||||
.getActiveVizContainer();
|
||||
if (editor != null) {
|
||||
IDescriptor desc = editor.getActiveDisplayPane()
|
||||
.getRenderableDisplay().getDescriptor();
|
||||
ShapefileResource vector = null;
|
||||
File f = new File(theShpFile);
|
||||
boolean spatiallySplit = false;
|
||||
long sz = f.length();
|
||||
if (sz > (10 * 1024 * 1024)) {
|
||||
// split the file
|
||||
spatiallySplit = true;
|
||||
}
|
||||
try {
|
||||
ShapefileResourceData data = new ShapefileResourceData(
|
||||
theShpFile.toString(),
|
||||
new String[] { theLabelAttribute });
|
||||
vector = data.construct(new LoadProperties(), desc);
|
||||
vector.getCapability(ColorableCapability.class)
|
||||
.setColor(new RGB(255, 255, 255));
|
||||
vector.setSpatiallySplit(spatiallySplit);
|
||||
if (isShaded) {
|
||||
vector.getCapability(ShadeableCapability.class)
|
||||
.setShadingField(theShadedAttribute);
|
||||
vector.setColorMapAttribute(theShadedAttribute);
|
||||
vector.setColorMap(colorMap);
|
||||
vector.setRegularPolygon(isRegularPolygon);
|
||||
|
||||
}
|
||||
|
||||
desc.getResourceList().add(vector);
|
||||
} catch (VizException e) {
|
||||
return new Status(Status.ERROR, "com.raytheon.viz",
|
||||
Status.OK, "Error loading shapefile", e);
|
||||
}
|
||||
editor.refresh();
|
||||
}
|
||||
|
||||
return Status.OK_STATUS;
|
||||
}
|
||||
|
||||
};
|
||||
j.schedule();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void init(IWorkbench anWorkbench, IStructuredSelection anSelection) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the shpFile
|
||||
*/
|
||||
public String getShpFile() {
|
||||
return theShpFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param anShpFile
|
||||
* the shpFile to set
|
||||
*/
|
||||
public void setShpFile(String anShpFile) {
|
||||
theShpFile = anShpFile;
|
||||
}
|
||||
|
||||
// /*
|
||||
// * (non-Javadoc)
|
||||
// *
|
||||
// * @see org.eclipse.jface.wizard.Wizard#canFinish()
|
||||
// */
|
||||
// @Override
|
||||
// public boolean canFinish() {
|
||||
// return isFinished;
|
||||
// }
|
||||
//
|
||||
// public void setFinished(boolean isFinished) {
|
||||
// this.isFinished = isFinished;
|
||||
// }
|
||||
//
|
||||
/**
|
||||
* @return the labelAttribute
|
||||
*/
|
||||
public String getLabelAttribute() {
|
||||
return theLabelAttribute;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param anLabelAttribute
|
||||
* the labelAttribute to set
|
||||
*/
|
||||
public void setLabelAttribute(String anLabelAttribute) {
|
||||
theLabelAttribute = anLabelAttribute;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the isShaded
|
||||
*/
|
||||
public boolean isShaded() {
|
||||
return isShaded;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param isShaded
|
||||
* the isShaded to set
|
||||
*/
|
||||
public void setShaded(boolean isShaded) {
|
||||
this.isShaded = isShaded;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the shadedAttribute
|
||||
*/
|
||||
public String getShadedAttribute() {
|
||||
return theShadedAttribute;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param anShadedAttribute
|
||||
* the shadedAttribute to set
|
||||
*/
|
||||
public void setShadedAttribute(String anShadedAttribute) {
|
||||
theShadedAttribute = anShadedAttribute;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the colorMap
|
||||
*/
|
||||
public HashMap<Object, RGB> getColorMap() {
|
||||
return colorMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param colorMap
|
||||
* the colorMap to set
|
||||
*/
|
||||
public void setColorMap(HashMap<Object, RGB> colorMap) {
|
||||
this.colorMap = colorMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the isRegularPolygon
|
||||
*/
|
||||
public boolean isRegularPolygon() {
|
||||
return isRegularPolygon;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param isRegularPolygon
|
||||
* the isRegularPolygon to set
|
||||
*/
|
||||
public void setRegularPolygon(boolean isRegularPolygon) {
|
||||
this.isRegularPolygon = isRegularPolygon;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,345 +0,0 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
|
||||
package com.raytheon.viz.shapefile.wizard;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import org.eclipse.jface.viewers.DoubleClickEvent;
|
||||
import org.eclipse.jface.viewers.IColorProvider;
|
||||
import org.eclipse.jface.viewers.IDoubleClickListener;
|
||||
import org.eclipse.jface.viewers.ILabelProvider;
|
||||
import org.eclipse.jface.viewers.ILabelProviderListener;
|
||||
import org.eclipse.jface.viewers.ISelectionChangedListener;
|
||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.jface.viewers.ListViewer;
|
||||
import org.eclipse.jface.viewers.SelectionChangedEvent;
|
||||
import org.eclipse.jface.viewers.TableViewer;
|
||||
import org.eclipse.jface.wizard.WizardPage;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.PaintEvent;
|
||||
import org.eclipse.swt.events.PaintListener;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
import org.eclipse.swt.events.SelectionListener;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Button;
|
||||
import org.eclipse.swt.widgets.ColorDialog;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Group;
|
||||
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.viz.shapefile.rsc.ShapefileResource;
|
||||
import com.raytheon.viz.shapefile.rsc.ShapefileUtil;
|
||||
|
||||
/**
|
||||
* Shapefile Wizard: select coloring of the data
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 7/1/06 chammack Initial Creation.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author chammack
|
||||
* @version 1
|
||||
*/
|
||||
public class ShapefileWizardColorPage extends WizardPage {
|
||||
|
||||
private ListViewer theList;
|
||||
|
||||
private TableViewer theValueList;
|
||||
|
||||
private Button randomColorButton;
|
||||
|
||||
private Button rgbColorButton;
|
||||
|
||||
private Button regularCheckBox;
|
||||
|
||||
public ShapefileWizardColorPage() {
|
||||
super("Shapefile Wizard: Select Coloring");
|
||||
this.setTitle("Shapefile Wizard: Select Coloring");
|
||||
this.setDescription("Select the method of coloring the data");
|
||||
|
||||
setPageComplete(true);
|
||||
}
|
||||
|
||||
public void createControl(Composite aParent) {
|
||||
|
||||
Composite composite = new Composite(aParent, SWT.NONE);
|
||||
GridLayout gl = new GridLayout(1, false);
|
||||
composite.setLayout(gl);
|
||||
|
||||
Group buttonGroup = new Group(composite, SWT.SHADOW_OUT);
|
||||
buttonGroup.setLayout(new GridLayout(3, true));
|
||||
Button button1 = new Button(buttonGroup, SWT.RADIO);
|
||||
button1.setText("Wireframe Only");
|
||||
button1.setLayoutData(new GridData(GridData.FILL, GridData.CENTER,
|
||||
true, false, 1, 1));
|
||||
button1.setSelection(true);
|
||||
randomColorButton = new Button(buttonGroup, SWT.RADIO);
|
||||
randomColorButton.setText("Unique Value Color Map");
|
||||
randomColorButton.setLayoutData(new GridData(GridData.FILL,
|
||||
GridData.CENTER, true, false, 1, 1));
|
||||
rgbColorButton = new Button(buttonGroup, SWT.RADIO);
|
||||
rgbColorButton.setText("RGB Dynamic Color Map");
|
||||
rgbColorButton.setLayoutData(new GridData(GridData.FILL,
|
||||
GridData.CENTER, true, false, 1, 1));
|
||||
|
||||
button1.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse
|
||||
* .swt.events.SelectionEvent)
|
||||
*/
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent anE) {
|
||||
((ShapefileWizard) getWizard()).setShaded(false);
|
||||
theList.getList().setEnabled(false);
|
||||
setPageComplete(true);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
randomColorButton.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse
|
||||
* .swt.events.SelectionEvent)
|
||||
*/
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent anE) {
|
||||
((ShapefileWizard) getWizard()).setShaded(true);
|
||||
theList.getList().setEnabled(true);
|
||||
setPageComplete(theList.getList().getSelectionCount() > 0);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
rgbColorButton.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse
|
||||
* .swt.events.SelectionEvent)
|
||||
*/
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent anE) {
|
||||
((ShapefileWizard) getWizard()).setShaded(true);
|
||||
theList.getList().setEnabled(true);
|
||||
setPageComplete(theList.getList().getSelectionCount() > 0);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
theList = new ListViewer(composite, SWT.V_SCROLL | SWT.BORDER
|
||||
| SWT.SINGLE);
|
||||
theList.getList().setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||
theList.getList().setEnabled(false);
|
||||
|
||||
theValueList = new TableViewer(composite, SWT.V_SCROLL | SWT.BORDER
|
||||
| SWT.SINGLE);
|
||||
theValueList.getControl().setLayoutData(
|
||||
new GridData(GridData.FILL_BOTH));
|
||||
|
||||
theValueList.setLabelProvider(new ColorProvider());
|
||||
composite.addPaintListener(new PaintListener() {
|
||||
|
||||
public void paintControl(PaintEvent anE) {
|
||||
if (theList.getList().getItemCount() == 0) {
|
||||
try {
|
||||
String shpName = ((ShapefileWizard) getWizard())
|
||||
.getShpFile();
|
||||
File f = new File(shpName);
|
||||
String[] attribs = ShapefileUtil
|
||||
.getAttributes(f, false);
|
||||
theList.getList().removeAll();
|
||||
theList.add(attribs);
|
||||
} catch (VizException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
theList.addSelectionChangedListener(new ISelectionChangedListener() {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged
|
||||
* (org.eclipse.jface.viewers.SelectionChangedEvent)
|
||||
*/
|
||||
public void selectionChanged(SelectionChangedEvent event) {
|
||||
String attribute = (String) ((IStructuredSelection) theList
|
||||
.getSelection()).getFirstElement();
|
||||
((ShapefileWizard) getWizard()).setShadedAttribute(attribute);
|
||||
|
||||
// Call the generation routine
|
||||
String shpName = ((ShapefileWizard) getWizard()).getShpFile();
|
||||
File f = new File(shpName);
|
||||
try {
|
||||
theValueList.getTable().removeAll();
|
||||
HashMap<Object, RGB> map = null;
|
||||
if (randomColorButton.getSelection()) {
|
||||
map = ShapefileResource.generateRandomAttributeMap(
|
||||
attribute, f);
|
||||
} else if (rgbColorButton.getSelection()) {
|
||||
map = ShapefileResource.generateRGBColorMap(attribute,
|
||||
f);
|
||||
}
|
||||
|
||||
((ShapefileWizard) getWizard()).setColorMap(map);
|
||||
|
||||
refreshLabels();
|
||||
setPageComplete(true);
|
||||
|
||||
} catch (VizException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
theValueList.addDoubleClickListener(new IDoubleClickListener() {
|
||||
|
||||
public void doubleClick(DoubleClickEvent event) {
|
||||
Object o = ((IStructuredSelection) event.getSelection())
|
||||
.getFirstElement();
|
||||
|
||||
ColorDialog cd = new ColorDialog(theList.getControl()
|
||||
.getShell());
|
||||
cd.setRGB(((ShapefileWizard) getWizard()).getColorMap().get(o));
|
||||
RGB newColor = cd.open();
|
||||
((ShapefileWizard) getWizard()).getColorMap().put(o, newColor);
|
||||
|
||||
theValueList.update(o, null);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
regularCheckBox = new Button(composite, SWT.CHECK);
|
||||
regularCheckBox.setText("Regular Polygon (check only for grids)");
|
||||
|
||||
regularCheckBox.addSelectionListener(new SelectionListener() {
|
||||
|
||||
public void widgetDefaultSelected(SelectionEvent e) {
|
||||
|
||||
}
|
||||
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
((ShapefileWizard) getWizard())
|
||||
.setRegularPolygon(regularCheckBox.getSelection());
|
||||
}
|
||||
|
||||
});
|
||||
setControl(composite);
|
||||
|
||||
}
|
||||
|
||||
private void refreshLabels() {
|
||||
HashMap<Object, RGB> map = ((ShapefileWizard) getWizard())
|
||||
.getColorMap();
|
||||
Set<Object> objSet = map.keySet();
|
||||
|
||||
objSet = new TreeSet<Object>(objSet);
|
||||
Iterator<Object> objIterator = objSet.iterator();
|
||||
|
||||
while (objIterator.hasNext()) {
|
||||
Object o = objIterator.next();
|
||||
theValueList.add(o);
|
||||
}
|
||||
}
|
||||
|
||||
public class ColorProvider implements IColorProvider, ILabelProvider {
|
||||
|
||||
ArrayList<Color> allocatedColors = new ArrayList<Color>();
|
||||
|
||||
public Color getBackground(Object element) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Color getForeground(Object element) {
|
||||
RGB rgb = ((ShapefileWizard) getWizard()).getColorMap()
|
||||
.get(element);
|
||||
|
||||
if (rgb == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Color c = new Color(getControl().getDisplay(), rgb);
|
||||
allocatedColors.add(c);
|
||||
return c;
|
||||
}
|
||||
|
||||
public void addListener(ILabelProviderListener listener) {
|
||||
|
||||
}
|
||||
|
||||
public void dispose() {
|
||||
for (Color c : allocatedColors) {
|
||||
c.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isLabelProperty(Object element, String property) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void removeListener(ILabelProviderListener listener) {
|
||||
}
|
||||
|
||||
public Image getImage(Object element) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getText(Object element) {
|
||||
return element.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -1,122 +0,0 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package com.raytheon.viz.shapefile.wizard;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.eclipse.jface.wizard.WizardPage;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Button;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.FileDialog;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
|
||||
/**
|
||||
* Shapefile Wizard: select the file
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 7/1/06 chammack Initial Creation.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author chammack
|
||||
* @version 1
|
||||
*/
|
||||
public class ShapefileWizardFilePage extends WizardPage {
|
||||
|
||||
private Text theDirectory;
|
||||
|
||||
public ShapefileWizardFilePage() {
|
||||
super("Shapefile Wizard: Select File");
|
||||
this.setTitle("Shapefile Wizard: Select File");
|
||||
this.setDescription("Import a Shapefile into Viz");
|
||||
|
||||
setPageComplete(false);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets
|
||||
* .Composite)
|
||||
*/
|
||||
public void createControl(final Composite aParent) {
|
||||
|
||||
Composite composite = new Composite(aParent, SWT.None);
|
||||
GridLayout gl = new GridLayout(3, false);
|
||||
composite.setLayout(gl);
|
||||
|
||||
Label label = new Label(composite, SWT.None);
|
||||
label.setText("&Filename: ");
|
||||
theDirectory = new Text(composite, SWT.BORDER);
|
||||
theDirectory.setText("");
|
||||
theDirectory.setEditable(false);
|
||||
theDirectory.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||
Button browse = new Button(composite, SWT.None);
|
||||
browse.setText("&Browse");
|
||||
browse.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse
|
||||
* .swt.events.SelectionEvent)
|
||||
*/
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent anE) {
|
||||
FileDialog selectDialog = new FileDialog(aParent.getShell(),
|
||||
SWT.OPEN);
|
||||
selectDialog.setFilterExtensions(new String[] { "*.shp" });
|
||||
String filePath = selectDialog.open();
|
||||
if (filePath != null) {
|
||||
File file = new File(filePath);
|
||||
if (file.exists() && file.canRead()) {
|
||||
theDirectory.setText(filePath);
|
||||
((ShapefileWizard) getWizard()).setShpFile(filePath);
|
||||
setPageComplete(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
setControl(composite);
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -1,131 +0,0 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
|
||||
package com.raytheon.viz.shapefile.wizard;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.eclipse.jface.wizard.WizardPage;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.PaintEvent;
|
||||
import org.eclipse.swt.events.PaintListener;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.List;
|
||||
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.viz.shapefile.rsc.ShapefileUtil;
|
||||
|
||||
/**
|
||||
* Shapefile Wizard: select the layer
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 7/1/06 chammack Initial Creation.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author chammack
|
||||
* @version 1
|
||||
*/
|
||||
public class ShapefileWizardLayerPage extends WizardPage {
|
||||
|
||||
private List theResourceList;
|
||||
|
||||
public ShapefileWizardLayerPage() {
|
||||
super("Shapefile Wizard: Select Label Attribute");
|
||||
this.setTitle("Shapefile Wizard: Select Label Attribute");
|
||||
this.setDescription("Select the labelling attribute");
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets
|
||||
* .Composite)
|
||||
*/
|
||||
public void createControl(Composite aParent) {
|
||||
setPageComplete(false);
|
||||
|
||||
Composite composite = new Composite(aParent, SWT.NONE);
|
||||
GridLayout gl = new GridLayout(1, false);
|
||||
composite.setLayout(gl);
|
||||
|
||||
Label label = new Label(composite, SWT.NONE);
|
||||
label.setText("&Attributes:");
|
||||
theResourceList = new List(composite, SWT.V_SCROLL | SWT.BORDER
|
||||
| SWT.SINGLE);
|
||||
theResourceList.setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||
|
||||
composite.addPaintListener(new PaintListener() {
|
||||
|
||||
public void paintControl(PaintEvent anE) {
|
||||
if (theResourceList.getItemCount() == 0) {
|
||||
try {
|
||||
String shpName = ((ShapefileWizard) getWizard())
|
||||
.getShpFile();
|
||||
File f = new File(shpName);
|
||||
String[] attribs = ShapefileUtil
|
||||
.getAttributes(f, false);
|
||||
theResourceList.setItems(attribs);
|
||||
} catch (VizException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
theResourceList.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse
|
||||
* .swt.events.SelectionEvent)
|
||||
*/
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent anE) {
|
||||
int idx = theResourceList.getSelectionIndex();
|
||||
((ShapefileWizard) getWizard())
|
||||
.setLabelAttribute(theResourceList.getItem(idx));
|
||||
|
||||
setPageComplete(true);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
setControl(composite);
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
/**
|
||||
* Contains the shapefile wizard
|
||||
*/
|
||||
package com.raytheon.viz.shapefile.wizard;
|
|
@ -33,6 +33,7 @@ import org.geotools.coverage.grid.GridGeometry2D;
|
|||
import org.geotools.geometry.DirectPosition2D;
|
||||
import org.geotools.geometry.Envelope2D;
|
||||
import org.geotools.geometry.jts.ReferencedEnvelope;
|
||||
import org.opengis.geometry.BoundingBox;
|
||||
import org.opengis.referencing.operation.MathTransform;
|
||||
|
||||
import com.raytheon.uf.common.comm.CommunicationException;
|
||||
|
@ -84,8 +85,9 @@ import com.vividsolutions.jts.geom.LineString;
|
|||
* Jul 31, 2012 875 rferrel Now uses points.
|
||||
* May 30, 2013 2055 bsteffen Remove modelName from sounding pointName.
|
||||
* Dec 06, 2013 2271 mpduff Added check for null coordinate.
|
||||
* Jan 30, 2014 #2725 ekladstrup updated exception handling during move of derived
|
||||
* Jan 30, 2014 #2725 ekladstrup updated exception handling during move of derived
|
||||
* parameters to common
|
||||
* Mar 11, 2014 #2718 randerso Changes for GeoTools 10.5
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -305,7 +307,7 @@ public class GridDataCatalog extends AbstractInventoryDataCatalog {
|
|||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Error occured during perturbation query.", e);
|
||||
}
|
||||
if (ensemebles != null && ensemebles.size() > 1) {
|
||||
if ((ensemebles != null) && (ensemebles.size() > 1)) {
|
||||
Collections.sort(ensemebles);
|
||||
Collection<ResourcePair> requests = new ArrayList<ResourcePair>();
|
||||
for (String ensemble : ensemebles) {
|
||||
|
@ -455,7 +457,7 @@ public class GridDataCatalog extends AbstractInventoryDataCatalog {
|
|||
lineEnv.add(dp.x, dp.y);
|
||||
}
|
||||
}
|
||||
if (lineEnv.intersects(env)) {
|
||||
if (lineEnv.intersects((BoundingBox) env)) {
|
||||
fileredSources.add(source);
|
||||
break;
|
||||
}
|
||||
|
@ -464,13 +466,13 @@ public class GridDataCatalog extends AbstractInventoryDataCatalog {
|
|||
gridGeom.getCoordinateReferenceSystem());
|
||||
rEnv = rEnv.transform(MapUtil.getLatLonProjection(), true);
|
||||
for (Double lat : lats) {
|
||||
if (rEnv.getMinY() < lat && rEnv.getMaxY() > lat) {
|
||||
if ((rEnv.getMinY() < lat) && (rEnv.getMaxY() > lat)) {
|
||||
fileredSources.add(source);
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (Double lon : lons) {
|
||||
if (rEnv.getMinX() < lon && rEnv.getMaxX() > lon) {
|
||||
if ((rEnv.getMinX() < lon) && (rEnv.getMaxX() > lon)) {
|
||||
fileredSources.add(source);
|
||||
break;
|
||||
}
|
||||
|
@ -489,9 +491,9 @@ public class GridDataCatalog extends AbstractInventoryDataCatalog {
|
|||
protected Collection<String> get3DPlanes(Collection<String> sources) {
|
||||
ViewMenu viewSelection = VolumeBrowserAction.getVolumeBrowserDlg()
|
||||
.getDialogSettings().getViewSelection();
|
||||
if (sources == null || sources.isEmpty()
|
||||
|| viewSelection == ViewMenu.PLANVIEW
|
||||
|| viewSelection == ViewMenu.TIMESERIES) {
|
||||
if ((sources == null) || sources.isEmpty()
|
||||
|| (viewSelection == ViewMenu.PLANVIEW)
|
||||
|| (viewSelection == ViewMenu.TIMESERIES)) {
|
||||
Set<String> results = new HashSet<String>();
|
||||
results.addAll(MenuItemManager.getInstance().getLatLonKeys());
|
||||
results.addAll(getPointLineKeys());
|
||||
|
@ -539,7 +541,7 @@ public class GridDataCatalog extends AbstractInventoryDataCatalog {
|
|||
lineEnv.add(dp.x, dp.y);
|
||||
}
|
||||
}
|
||||
if (lineEnv.intersects(env)) {
|
||||
if (lineEnv.intersects((BoundingBox) env)) {
|
||||
validPlanes.add("Line" + letter);
|
||||
}
|
||||
}
|
||||
|
@ -551,13 +553,15 @@ public class GridDataCatalog extends AbstractInventoryDataCatalog {
|
|||
if (llKey.startsWith("Lat")) {
|
||||
double lat = Double.parseDouble(llKey.replace(
|
||||
"Lat", ""));
|
||||
if (rEnv.getMinY() < lat && rEnv.getMaxY() > lat) {
|
||||
if ((rEnv.getMinY() < lat)
|
||||
&& (rEnv.getMaxY() > lat)) {
|
||||
validPlanes.add(llKey);
|
||||
}
|
||||
} else if (llKey.startsWith("Lon")) {
|
||||
double lon = Double.parseDouble(llKey.replace(
|
||||
"Lon", ""));
|
||||
if (rEnv.getMinX() < lon && rEnv.getMaxX() > lon) {
|
||||
if ((rEnv.getMinX() < lon)
|
||||
&& (rEnv.getMaxX() > lon)) {
|
||||
validPlanes.add(llKey);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -1,52 +1,47 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="lib" path="common-2.2.1.jar"/>
|
||||
<classpathentry kind="lib" path="common-2.6.0.jar"/>
|
||||
<classpathentry kind="lib" path="commons-beanutils-1.7.0.jar"/>
|
||||
<classpathentry kind="lib" path="commons-collections-3.1.jar"/>
|
||||
<classpathentry kind="lib" path="commons-dbcp-1.2.2.jar"/>
|
||||
<classpathentry kind="lib" path="commons-jxpath-1.2.jar"/>
|
||||
<classpathentry kind="lib" path="commons-dbcp-1.3.jar"/>
|
||||
<classpathentry kind="lib" path="commons-jxpath-1.3.jar"/>
|
||||
<classpathentry kind="lib" path="commons-lang-2.3.jar"/>
|
||||
<classpathentry kind="lib" path="commons-pool-1.5.3.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="ecore-2.2.2.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="geoapi-2.3-M1.jar" sourcepath="geoapi-2.3-M1-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="geoapi-pending-2.3-M1.jar" sourcepath="geoapi-pending-2.3-M1-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-api-2.6.4.jar" sourcepath="gt-api-2.6.4-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-coverage-2.6.4.jar" sourcepath="gt-coverage-2.6.4-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-cql-2.6.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-data-2.6.4.jar" sourcepath="gt-data-2.6.4-sources.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-directory-2.6.4.jar" sourcepath="gt-directory-2.6.4-sources.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-epsg-wkt-2.6.4.jar" sourcepath="gt-epsg-wkt-2.6.4-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-geotiff-2.6.4.jar" sourcepath="gt-geotiff-2.6.4-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-graph-2.6.4.jar" sourcepath="gt-graph-2.6.4-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-gtopo30-2.6.4.jar" sourcepath="gt-gtopo30-2.6.4-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-image-2.6.4.jar" sourcepath="gt-image-2.6.4-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-jdbc-postgis-2.6.4.jar" sourcepath="gt-jdbc-postgis-2.6.4-sources.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-main-2.6.4.jar" sourcepath="gt-main-2.6.4-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-metadata-2.6.4.jar" sourcepath="gt-metadata-2.6.4-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-postgis-2.6.4.jar" sourcepath="gt-postgis-2.6.4-sources.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-referencing-2.6.4.jar" sourcepath="gt-referencing-2.6.4-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-referencing3D-2.6.4.jar" sourcepath="gt-referencing3D-2.6.4-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-render-2.6.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-shapefile-2.6.4.jar" sourcepath="gt-shapefile-2.6.4-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-xml-2.6.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-xsd-filter-2.6.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-xsd-gml2-2.6.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-xsd-gml3-2.6.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-xsd-kml-2.6.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-xsd-ows-2.6.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-xsd-sld-2.6.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-xsd-wfs-2.6.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-wfs-2.6.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="net.opengis.ows-2.6.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="net.opengis.wfs-2.6.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="net.opengis.wfsv-2.6.4.jar"/>
|
||||
<classpathentry kind="lib" path="commons-pool-1.5.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="ecore-2.6.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-api-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-coverage-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-cql-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-data-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-epsg-wkt-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-geotiff-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-graph-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-gtopo30-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-image-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-jdbc-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-jdbc-postgis-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-main-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-metadata-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-opengis-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-referencing-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-referencing3D-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-render-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-shapefile-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-xml-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-xsd-filter-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-xsd-gml2-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-xsd-gml3-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-xsd-kml-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-xsd-ows-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-xsd-sld-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-xsd-wfs-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-wfs-10.5.jar" sourcepath="geotools-source-10.5.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="net.opengis.ows-10.5.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="net.opengis.wfs-10.5.jar"/>
|
||||
<classpathentry kind="lib" path="jdom-1.0.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="jts-1.10.jar" sourcepath="jts-1.10.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="jts-1.13.jar" sourcepath="jts-1.13-sources.jar"/>
|
||||
<classpathentry kind="lib" path="picocontainer-1.2.jar"/>
|
||||
<classpathentry kind="lib" path="xercesImpl-2.7.1.jar"/>
|
||||
<classpathentry kind="lib" path="xsd-2.2.2.jar"/>
|
||||
<classpathentry kind="lib" path="xsd-2.6.0.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
<referencedentry exported="true" kind="lib" path="gt-jdbc-2.6.4.jar" sourcepath="gt-jdbc-2.6.4-sources.zip"/>
|
||||
</classpath>
|
||||
|
|
|
@ -2,54 +2,49 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Geotools Plug-in
|
||||
Bundle-SymbolicName: org.geotools
|
||||
Bundle-Version: 2.6.4
|
||||
Bundle-ClassPath: common-2.2.1.jar,
|
||||
Bundle-Version: 10.5
|
||||
Bundle-ClassPath: common-2.6.0.jar,
|
||||
commons-beanutils-1.7.0.jar,
|
||||
commons-collections-3.1.jar,
|
||||
commons-dbcp-1.2.2.jar,
|
||||
commons-jxpath-1.2.jar,
|
||||
commons-dbcp-1.3.jar,
|
||||
commons-jxpath-1.3.jar,
|
||||
commons-lang-2.3.jar,
|
||||
commons-pool-1.5.3.jar,
|
||||
ecore-2.2.2.jar,
|
||||
geoapi-2.3-M1.jar,
|
||||
geoapi-pending-2.3-M1.jar,
|
||||
gt-api-2.6.4.jar,
|
||||
gt-coverage-2.6.4.jar,
|
||||
gt-cql-2.6.4.jar,
|
||||
gt-epsg-wkt-2.6.4.jar,
|
||||
gt-geotiff-2.6.4.jar,
|
||||
gt-graph-2.6.4.jar,
|
||||
gt-gtopo30-2.6.4.jar,
|
||||
gt-image-2.6.4.jar,
|
||||
gt-jdbc-2.6.4.jar,
|
||||
gt-jdbc-postgis-2.6.4.jar,
|
||||
gt-main-2.6.4.jar,
|
||||
gt-metadata-2.6.4.jar,
|
||||
gt-referencing-2.6.4.jar,
|
||||
gt-referencing3D-2.6.4.jar,
|
||||
gt-render-2.6.4.jar,
|
||||
gt-shapefile-2.6.4.jar,
|
||||
gt-xml-2.6.4.jar,
|
||||
gt-xsd-core-2.6.4.jar,
|
||||
gt-xsd-filter-2.6.4.jar,
|
||||
gt-xsd-gml2-2.6.4.jar,
|
||||
gt-xsd-gml3-2.6.4.jar,
|
||||
gt-xsd-kml-2.6.4.jar,
|
||||
gt-xsd-sld-2.6.4.jar,
|
||||
commons-pool-1.5.4.jar,
|
||||
ecore-2.6.1.jar,
|
||||
gt-api-10.5.jar,
|
||||
gt-coverage-10.5.jar,
|
||||
gt-cql-10.5.jar,
|
||||
gt-data-10.5.jar,
|
||||
gt-epsg-wkt-10.5.jar,
|
||||
gt-geotiff-10.5.jar,
|
||||
gt-graph-10.5.jar,
|
||||
gt-gtopo30-10.5.jar,
|
||||
gt-image-10.5.jar,
|
||||
gt-jdbc-10.5.jar,
|
||||
gt-jdbc-postgis-10.5.jar,
|
||||
gt-main-10.5.jar,
|
||||
gt-metadata-10.5.jar,
|
||||
gt-opengis-10.5.jar,
|
||||
gt-referencing-10.5.jar,
|
||||
gt-referencing3D-10.5.jar,
|
||||
gt-render-10.5.jar,
|
||||
gt-shapefile-10.5.jar,
|
||||
gt-xml-10.5.jar,
|
||||
gt-xsd-core-10.5.jar,
|
||||
gt-xsd-filter-10.5.jar,
|
||||
gt-xsd-gml2-10.5.jar,
|
||||
gt-xsd-gml3-10.5.jar,
|
||||
gt-xsd-kml-10.5.jar,
|
||||
gt-xsd-ows-10.5.jar,
|
||||
gt-xsd-sld-10.5.jar,
|
||||
gt-xsd-wfs-10.5.jar,
|
||||
gt-wfs-10.5.jar,
|
||||
jdom-1.0.jar,
|
||||
gt-postgis-2.6.4.jar,
|
||||
gt-wfs-2.6.4.jar,
|
||||
jts-1.10.jar,
|
||||
jts-1.13.jar,
|
||||
net.opengis.ows-10.5.jar,
|
||||
net.opengis.wfs-10.5.jar,
|
||||
picocontainer-1.2.jar,
|
||||
xercesImpl-2.7.1.jar,
|
||||
xsd-2.2.2.jar,
|
||||
gt-xsd-wfs-2.6.4.jar,
|
||||
gt-xsd-ows-2.6.4.jar,
|
||||
net.opengis.ows-2.6.4.jar,
|
||||
net.opengis.wfs-2.6.4.jar,
|
||||
net.opengis.wfsv-2.6.4.jar,
|
||||
gt-directory-2.6.4.jar,
|
||||
gt-data-2.6.4.jar
|
||||
xsd-2.6.0.jar
|
||||
Bundle-Vendor: Raytheon-bundled OSS
|
||||
Export-Package: com.vividsolutions.jts,
|
||||
com.vividsolutions.jts.algorithm,
|
||||
|
@ -105,24 +100,21 @@ Export-Package: com.vividsolutions.jts,
|
|||
org.geotools.data.crs,
|
||||
org.geotools.data.directory,
|
||||
org.geotools.data.jdbc,
|
||||
org.geotools.data.jdbc.attributeio,
|
||||
org.geotools.data.jdbc.datasource,
|
||||
org.geotools.data.jdbc.fidmapper,
|
||||
org.geotools.data.jdbc.referencing,
|
||||
org.geotools.data.memory,
|
||||
org.geotools.data.ows,
|
||||
org.geotools.data.postgis,
|
||||
org.geotools.data.postgis.attributeio,
|
||||
org.geotools.data.postgis.collection,
|
||||
org.geotools.data.postgis.fidmapper,
|
||||
org.geotools.data.postgis.referencing,
|
||||
org.geotools.data.shapefile,
|
||||
org.geotools.data.shapefile.dbf,
|
||||
org.geotools.data.shapefile.indexed,
|
||||
org.geotools.data.shapefile.indexed.attribute,
|
||||
org.geotools.data.shapefile.prj,
|
||||
org.geotools.data.shapefile.fid,
|
||||
org.geotools.data.shapefile.files,
|
||||
org.geotools.data.shapefile.index,
|
||||
org.geotools.data.shapefile.index.quadtree,
|
||||
org.geotools.data.shapefile.index.quadtree.fs,
|
||||
org.geotools.data.shapefile.shp,
|
||||
org.geotools.data.shapefile.shp.xml,
|
||||
org.geotools.data.simple,
|
||||
org.geotools.data.store,
|
||||
org.geotools.data.view,
|
||||
org.geotools.data.wfs,
|
||||
|
@ -150,8 +142,6 @@ Export-Package: com.vividsolutions.jts,
|
|||
org.geotools.filter.v1_1.capabilities,
|
||||
org.geotools.filter.visitor,
|
||||
org.geotools.gce.geotiff,
|
||||
org.geotools.gce.geotiff.adapters,
|
||||
org.geotools.gce.geotiff.codes,
|
||||
org.geotools.gce.gtopo30,
|
||||
org.geotools.gce.image,
|
||||
org.geotools.geometry,
|
||||
|
@ -198,9 +188,6 @@ Export-Package: com.vividsolutions.jts,
|
|||
org.geotools.image.io,
|
||||
org.geotools.image.jai,
|
||||
org.geotools.image.palette,
|
||||
org.geotools.index,
|
||||
org.geotools.index.quadtree,
|
||||
org.geotools.index.quadtree.fs,
|
||||
org.geotools.io,
|
||||
org.geotools.jdbc,
|
||||
org.geotools.kml,
|
||||
|
@ -280,11 +267,7 @@ Export-Package: com.vividsolutions.jts,
|
|||
org.opengis.annotation,
|
||||
org.opengis.coverage,
|
||||
org.opengis.coverage.grid,
|
||||
org.opengis.coverage.grid.quadrilateral,
|
||||
org.opengis.coverage.processing,
|
||||
org.opengis.display.canvas,
|
||||
org.opengis.display.container,
|
||||
org.opengis.display.primitive,
|
||||
org.opengis.feature,
|
||||
org.opengis.feature.simple,
|
||||
org.opengis.feature.type,
|
||||
|
@ -310,23 +293,15 @@ Export-Package: com.vividsolutions.jts,
|
|||
org.opengis.metadata.maintenance,
|
||||
org.opengis.metadata.quality,
|
||||
org.opengis.metadata.spatial,
|
||||
org.opengis.observation,
|
||||
org.opengis.observation.coverage,
|
||||
org.opengis.observation.sampling,
|
||||
org.opengis.parameter,
|
||||
org.opengis.referencing,
|
||||
org.opengis.referencing.crs,
|
||||
org.opengis.referencing.cs,
|
||||
org.opengis.referencing.datum,
|
||||
org.opengis.referencing.operation,
|
||||
org.opengis.sld,
|
||||
org.opengis.style,
|
||||
org.opengis.style.portrayal,
|
||||
org.opengis.temporal,
|
||||
org.opengis.util,
|
||||
org.opengis.webservice,
|
||||
org.opengis.webservice.capability,
|
||||
org.opengis.webservice.feature
|
||||
org.opengis.util
|
||||
Require-Bundle: javax.vecmath;bundle-version="1.3.1",
|
||||
javax.measure;bundle-version="1.0.0",
|
||||
org.postgres;bundle-version="1.0.0",
|
||||
|
|
|
@ -1,58 +1,48 @@
|
|||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
common-2.2.1.jar,\
|
||||
common-2.6.0.jar,\
|
||||
commons-beanutils-1.7.0.jar,\
|
||||
commons-collections-3.1.jar,\
|
||||
commons-dbcp-1.2.2.jar,\
|
||||
commons-jxpath-1.2.jar,\
|
||||
commons-dbcp-1.3.jar,\
|
||||
commons-jxpath-1.3.jar,\
|
||||
commons-lang-2.3.jar,\
|
||||
commons-pool-1.5.3.jar,\
|
||||
ecore-2.2.2.jar,\
|
||||
geoapi-2.3-M1.jar,\
|
||||
geoapi-pending-2.3-M1.jar,\
|
||||
gt-api-2.6.4.jar,\
|
||||
gt-coverage-2.6.4.jar,\
|
||||
gt-cql-2.6.4.jar,\
|
||||
gt-epsg-wkt-2.6.4.jar,\
|
||||
gt-geotiff-2.6.4.jar,\
|
||||
gt-graph-2.6.4.jar,\
|
||||
gt-gtopo30-2.6.4.jar,\
|
||||
gt-image-2.6.4.jar,\
|
||||
gt-main-2.6.4.jar,\
|
||||
gt-metadata-2.6.4.jar,\
|
||||
gt-referencing-2.6.4.jar,\
|
||||
gt-referencing3D-2.6.4.jar,\
|
||||
gt-render-2.6.4.jar,\
|
||||
gt-shapefile-2.6.4.jar,\
|
||||
gt-xml-2.6.4.jar,\
|
||||
gt-xsd-core-2.6.4.jar,\
|
||||
gt-xsd-filter-2.6.4.jar,\
|
||||
gt-xsd-gml2-2.6.4.jar,\
|
||||
gt-xsd-gml3-2.6.4.jar,\
|
||||
gt-xsd-kml-2.6.4.jar,\
|
||||
gt-xsd-sld-2.6.4.jar,\
|
||||
commons-pool-1.5.4.jar,\
|
||||
ecore-2.6.1.jar,\
|
||||
gt-api-10.5.jar,\
|
||||
gt-coverage-10.5.jar,\
|
||||
gt-cql-10.5.jar,\
|
||||
gt-data-10.5.jar,\
|
||||
gt-epsg-wkt-10.5.jar,\
|
||||
gt-geotiff-10.5.jar,\
|
||||
gt-graph-10.5.jar,\
|
||||
gt-gtopo30-10.5.jar,\
|
||||
gt-image-10.5.jar,\
|
||||
gt-jdbc-10.5.jar,\
|
||||
gt-jdbc-postgis-10.5.jar,\
|
||||
gt-main-10.5.jar,\
|
||||
gt-metadata-10.5.jar,\
|
||||
gt-opengis-10.5.jar,\
|
||||
gt-referencing-10.5.jar,\
|
||||
gt-referencing3D-10.5.jar,\
|
||||
gt-render-10.5.jar,\
|
||||
gt-shapefile-10.5.jar,\
|
||||
gt-wfs-10.5.jar,\
|
||||
gt-xml-10.5.jar,\
|
||||
gt-xsd-core-10.5.jar,\
|
||||
gt-xsd-filter-10.5.jar,\
|
||||
gt-xsd-gml2-10.5.jar,\
|
||||
gt-xsd-gml3-10.5.jar,\
|
||||
gt-xsd-kml-10.5.jar,\
|
||||
gt-xsd-ows-10.5.jar,\
|
||||
gt-xsd-sld-10.5.jar,\
|
||||
gt-xsd-wfs-10.5.jar,\
|
||||
jdom-1.0.jar,\
|
||||
jts-1.10.jar,\
|
||||
commons-beanutils-1.7.0.jar,\
|
||||
commons-collections-3.1.jar,\
|
||||
commons-dbcp-1.2.2.jar,\
|
||||
commons-jxpath-1.2.jar,\
|
||||
commons-lang-2.3.jar,\
|
||||
commons-pool-1.5.3.jar,\
|
||||
common-2.2.1.jar,\
|
||||
jdom-1.0.jar,\
|
||||
gt-postgis-2.6.4.jar,\
|
||||
gt-jdbc-2.6.4.jar,\
|
||||
gt-jdbc-postgis-2.6.4.jar,\
|
||||
jts-1.13.jar,\
|
||||
jts-1.13-sources.jar,\
|
||||
net.opengis.ows-10.5.jar,\
|
||||
net.opengis.wfs-10.5.jar,\
|
||||
picocontainer-1.2.jar,\
|
||||
xercesImpl-2.7.1.jar,\
|
||||
xsd-2.2.2.jar,\
|
||||
gt-wfs-2.6.4.jar,\
|
||||
gt-xsd-wfs-2.6.4.jar,\
|
||||
gt-xsd-ows-2.6.4.jar,\
|
||||
net.opengis.ows-2.6.4.jar,\
|
||||
net.opengis.wfs-2.6.4.jar,\
|
||||
net.opengis.wfsv-2.6.4.jar,\
|
||||
gt-data-2.6.4.jar,\
|
||||
gt-directory-2.6.4.jar
|
||||
|
||||
xml-apis-1.0.b2.jar,\
|
||||
xml-apis-xerces-2.7.1.jar,\
|
||||
xsd-2.6.0.jar
|
||||
|
|
Binary file not shown.
BIN
cots/org.geotools/common-2.6.0.jar
Normal file
BIN
cots/org.geotools/common-2.6.0.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
cots/org.geotools/commons-dbcp-1.3.jar
Normal file
BIN
cots/org.geotools/commons-dbcp-1.3.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
cots/org.geotools/commons-jxpath-1.3.jar
Normal file
BIN
cots/org.geotools/commons-jxpath-1.3.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
cots/org.geotools/ecore-2.6.1.jar
Normal file
BIN
cots/org.geotools/ecore-2.6.1.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
cots/org.geotools/geotools-source-10.5.zip
Normal file
BIN
cots/org.geotools/geotools-source-10.5.zip
Normal file
Binary file not shown.
BIN
cots/org.geotools/gt-api-10.5.jar
Normal file
BIN
cots/org.geotools/gt-api-10.5.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
cots/org.geotools/gt-coverage-10.5.jar
Normal file
BIN
cots/org.geotools/gt-coverage-10.5.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
cots/org.geotools/gt-cql-10.5.jar
Normal file
BIN
cots/org.geotools/gt-cql-10.5.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
cots/org.geotools/gt-data-10.5.jar
Normal file
BIN
cots/org.geotools/gt-data-10.5.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
cots/org.geotools/gt-epsg-wkt-10.5.jar
Normal file
BIN
cots/org.geotools/gt-epsg-wkt-10.5.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
cots/org.geotools/gt-geotiff-10.5.jar
Normal file
BIN
cots/org.geotools/gt-geotiff-10.5.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
cots/org.geotools/gt-graph-10.5.jar
Normal file
BIN
cots/org.geotools/gt-graph-10.5.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
cots/org.geotools/gt-gtopo30-10.5.jar
Normal file
BIN
cots/org.geotools/gt-gtopo30-10.5.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
cots/org.geotools/gt-image-10.5.jar
Normal file
BIN
cots/org.geotools/gt-image-10.5.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
cots/org.geotools/gt-jdbc-10.5.jar
Normal file
BIN
cots/org.geotools/gt-jdbc-10.5.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
cots/org.geotools/gt-jdbc-postgis-10.5.jar
Normal file
BIN
cots/org.geotools/gt-jdbc-postgis-10.5.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
cots/org.geotools/gt-main-10.5.jar
Normal file
BIN
cots/org.geotools/gt-main-10.5.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
cots/org.geotools/gt-metadata-10.5.jar
Normal file
BIN
cots/org.geotools/gt-metadata-10.5.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
cots/org.geotools/gt-opengis-10.5.jar
Normal file
BIN
cots/org.geotools/gt-opengis-10.5.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
cots/org.geotools/gt-referencing-10.5.jar
Normal file
BIN
cots/org.geotools/gt-referencing-10.5.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
cots/org.geotools/gt-render-10.5.jar
Normal file
BIN
cots/org.geotools/gt-render-10.5.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
cots/org.geotools/gt-shapefile-10.5.jar
Normal file
BIN
cots/org.geotools/gt-shapefile-10.5.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
cots/org.geotools/gt-wfs-10.5.jar
Normal file
BIN
cots/org.geotools/gt-wfs-10.5.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
cots/org.geotools/gt-xml-10.5.jar
Normal file
BIN
cots/org.geotools/gt-xml-10.5.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
cots/org.geotools/gt-xsd-core-10.5.jar
Normal file
BIN
cots/org.geotools/gt-xsd-core-10.5.jar
Normal file
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue