Package org.geotools.caching.util

Examples of org.geotools.caching.util.Generator


     * @throws ClassNotFoundException
     * @throws IllegalAttributeException
     */
    public void testMarshall()
        throws IOException, ClassNotFoundException, IllegalAttributeException {
        Generator gen = new Generator(1000, 1000);
        SimpleFeature f = gen.createFeature(0);
        SimpleFeatureMarshaller m = new SimpleFeatureMarshaller();
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(baos);
        m.marshall(f, oos);

View Full Code Here


     * @throws ClassNotFoundException
     * @throws IllegalAttributeException
     */
    public void ztestComplexMarshall()
        throws IOException, ClassNotFoundException, IllegalAttributeException {
        Generator gen = new Generator(1000, 1000);
        SimpleFeature f = gen.createFeature(0);
        SimpleFeatureMarshaller m = new SimpleFeatureMarshaller();
       
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(baos);
        m.marshall(f, oos);
View Full Code Here

     *   <ul><li>0.8 ms per feature for a marshall/unmarshall cycle
     *       <li>0.2 ms per feature for marshalling only
     *   </ul>
     */
    public void ztestMarshallTime() {
        Generator gen = new Generator(1000, 1000);
        List features = new ArrayList();

        for (int i = 0; i < 10000; i++) {
            SimpleFeature f = gen.createFeature(i);
            features.add(f);
        }

        long start = System.currentTimeMillis();

View Full Code Here

*/
public class DataUtilities {
    static FilterFactoryImpl ff = new FilterFactoryImpl();

    public static DefaultFeatureCollection createUnitsquareDataSet(int numdata) {
        Generator gen = new Generator(1, 1);
        DefaultFeatureCollection dataset = new DefaultFeatureCollection("Test", Generator.type);

        for (int i = 0; i < numdata; i++) {
            dataset.add(gen.createFeature(i));
        }

        return dataset;
    }
View Full Code Here

        return dataset;
    }

    public static DefaultFeatureCollection createUnitsquareDataSet(int numdata, long seed) {
        Generator gen = new Generator(1, 1, seed);
        DefaultFeatureCollection dataset = new DefaultFeatureCollection("Test", Generator.type);

        for (int i = 0; i < numdata; i++) {
            dataset.add(gen.createFeature(i));
        }

        return dataset;
    }
View Full Code Here

TOP

Related Classes of org.geotools.caching.util.Generator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.