Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 3 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Commits on Oct 15, 2012
@rmarianski rmarianski support .kmz as a .zip file 4b4767b
@rmarianski rmarianski metadata flag to trigger bounds recalculation
This is useful because when an empty bounds is set and the user modifies
the layer, it gets set to something other than empty bounds, even though
the user didn't touch the bounds in the ui. This forces recalculation
regardless.
e7fa2b3
@rmarianski rmarianski use item layer name instead of feature type
The item layer name is better to use because the user could have
modified the layer before proceeding with the import. Using the feature
type name would have overrided the user's input.
2ecef9b
View
5 importer/src/main/java/org/opengeo/data/importer/Importer.java
@@ -776,7 +776,8 @@ void doIndirectImport(ImportTask task, ImportFilter filter) throws IOException {
// the result of a transform. there may be another way...
FeatureTypeInfo resource = getCatalog().getResourceByName(
featureType.getQualifiedName(), FeatureTypeInfo.class);
- if (resource.getNativeBoundingBox().isEmpty()) {
+ if (resource.getNativeBoundingBox().isEmpty()
+ || resource.getMetadata().get("recalculate-bounds") != null) {
// force computation
CatalogBuilder cb = new CatalogBuilder(getCatalog());
ReferencedEnvelope nativeBounds = cb.getNativeBounds(resource);
@@ -839,7 +840,7 @@ void loadIntoDataStore(ImportItem item, DataStoreInfo store, VectorFormat format
ImportData data = item.getTask().getData();
FeatureReader reader = format.read(data, item);
SimpleFeatureType featureType = (SimpleFeatureType) reader.getFeatureType();
- String featureTypeName = featureType.getName().getLocalPart();
+ String featureTypeName = item.getLayer().getName();
DataStore dataStore = (DataStore) store.getDataStore(null);
FeatureDataConverter featureDataConverter = FeatureDataConverter.DEFAULT;
View
4 importer/src/main/java/org/opengeo/data/importer/VFSWorker.java
@@ -33,7 +33,7 @@
private static final Logger LOGGER = Logging.getLogger(VFSWorker.class);
private static final List<String> extensions = Arrays.asList(".zip", ".tar", ".tar.gz", ".tgz",
- ".tar.bz2", ".tbz2", ".gz", ".bz2", ".jar");
+ ".tar.bz2", ".tbz2", ".gz", ".bz2", ".jar", ".kmz");
public VFSWorker() {
@@ -130,7 +130,7 @@ private String getaArchiveURLProtocol(final File file) {
return "file://";
}
String name = file.getName().toLowerCase();
- if (name.endsWith(".zip")) {
+ if (name.endsWith(".zip") || name.endsWith(".kmz")) {
return "zip://";
}
if (name.endsWith(".tar")) {
View
1  importer/src/main/java/org/opengeo/data/importer/format/KMLFileFormat.java
@@ -274,6 +274,7 @@ public SimpleFeatureType convertParsedFeatureType(SimpleFeatureType ft, String n
resource.setNativeCRS(KML_CRS);
resource.setNativeBoundingBox(EMPTY_BOUNDS);
resource.setLatLonBoundingBox(EMPTY_BOUNDS);
+ resource.getMetadata().put("recalculate-bounds", Boolean.TRUE);
Map<Object, Object> userData = featureType.getUserData();
if (userData.containsKey("schemaname")) {

No commit comments for this range

Something went wrong with that request. Please try again.