AGGeospatialSubtypes.java
package com.franz.agbase.examples;
import com.franz.agbase.*;
public class AGGeospatialSubtypes {
@param
@throws
public static void main(String[] args) throws AllegroGraphException {
AllegroGraphConnection ags = new AllegroGraphConnection();
try {
ags.enable();
} catch (Exception e) {
throw new AllegroGraphException("Server connection problem", e);
}
AllegroGraph ts = ags.renew("geospatialsubtypes", AGPaths.TRIPLE_STORES);
GeoExtension geo = ts.getGeoExtension();
GeospatialSubtype subtype1 = geo.registerCartesianStriping(0, 1, 0, 1, .01);
geo.addSubtype(subtype1);
GeospatialSubtype subtype2 = geo.registerLatitudeStripingInDegrees(3);
geo.addSubtype(subtype2);
GeospatialSubtype subtype3 = geo.registerLatitudeStripingInKm(50);
geo.addSubtype(subtype3);
GeospatialSubtype subtype4 = geo.registerLatitudeStripingInMiles(5);
geo.addSubtype(subtype4);
GeospatialSubtype subtype[] = geo.getSubtypes();
for (int i=0;i<subtype.length;i++) {
System.out.println(subtype[i]);
}
ts.closeTripleStore();
ags.disable();
}
}
Up |
Next