2 |
* Copyright (c) 2009 Martin O. J. Schmitz. |
* Copyright (c) 2009 Martin O. J. Schmitz. |
3 |
* |
* |
4 |
* This file is part of the SCHMITZM library - a collection of utility |
* This file is part of the SCHMITZM library - a collection of utility |
5 |
* classes based on Java 1.6, focussing (not only) on Java Swing |
* classes based on Java 1.6, focusing (not only) on Java Swing |
6 |
* and the Geotools library. |
* and the Geotools library. |
7 |
* |
* |
8 |
* The SCHMITZM project is hosted at: |
* The SCHMITZM project is hosted at: |
40 |
import org.geotools.data.collection.CollectionDataStore; |
import org.geotools.data.collection.CollectionDataStore; |
41 |
import org.geotools.feature.AttributeType; |
import org.geotools.feature.AttributeType; |
42 |
import org.geotools.feature.FeatureCollection; |
import org.geotools.feature.FeatureCollection; |
43 |
import org.geotools.feature.FeatureType; |
import org.geotools.feature.SimpleFeatureType; |
44 |
import org.geotools.styling.Style; |
import org.geotools.styling.Style; |
45 |
|
|
46 |
import schmitzm.geotools.feature.FeatureUtil; |
import schmitzm.geotools.feature.FeatureUtil; |
302 |
public static Map<Integer, AttributeMetaData> createDefaultAttributeMetaDataMap( |
public static Map<Integer, AttributeMetaData> createDefaultAttributeMetaDataMap( |
303 |
FeatureCollection fc) { |
FeatureCollection fc) { |
304 |
HashMap<Integer, AttributeMetaData> metaDataMap = new HashMap<Integer, AttributeMetaData>(); |
HashMap<Integer, AttributeMetaData> metaDataMap = new HashMap<Integer, AttributeMetaData>(); |
305 |
FeatureType ftype = fc.getSchema(); |
SimpleFeatureType ftype = fc.getSchema(); |
306 |
for (int i = 0; i < ftype.getAttributeCount(); i++) { |
for (int i = 0; i < ftype.getAttributeCount(); i++) { |
307 |
AttributeType aType = ftype.getAttributeType(i); |
AttributeType aType = ftype.getAttributeType(i); |
308 |
if (aType != ftype.getDefaultGeometry()) |
if (aType != ftype.getDefaultGeometry()) |