Skip to content

Raster custom projection#1275

Merged
rfecher merged 8 commits intolocationtech:masterfrom
srinivasreddyv2:raster-custom-projection
Mar 1, 2018
Merged

Raster custom projection#1275
rfecher merged 8 commits intolocationtech:masterfrom
srinivasreddyv2:raster-custom-projection

Conversation

@srinivasreddyv2
Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Srinivas Varala <srinivas.varala@gmail.com>
Signed-off-by: Srinivas Varala <srinivas.varala@gmail.com>
Signed-off-by: Srinivas Varala <srinivas.varala@gmail.com>
Signed-off-by: Srinivas Varala <srinivas.varala@gmail.com>
Signed-off-by: Srinivas Varala <srinivas.varala@gmail.com>
final PrimaryIndex index )
throws Exception {
final PrimaryIndex index = new SpatialIndexBuilder().createIndex();
// final PrimaryIndex index = new SpatialIndexBuilder().createIndex();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented out code

for (final IntermediateSplitInfo split : splits) {
retVal.add(split.toFinalSplit());
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented out code

Envelope mapExtent;

CoordinateReferenceSystem crs = null;
if (crsCode.equals(GeometryUtils.DEFAULT_CRS_STR)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we check for null || empty || crsCode equals default

@Parameter(names = "--cqlFilter", description = "An optional CQL filter applied to the input data")
private String cqlFilter;

@Parameter(names = "--outputIndex", description = "An optional index for output datastore. Only spatial index is supported")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simple wording suggestion: Only spatial index type is supported.

public void init(
PrimaryIndex... indices ) {
// TODO Auto-generated method stub
String indexCrsCode = null;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this set of code necessary at all? I read it as assigned a local variable that is unused and the index is coming into fitToIndex so this currently seems unnecessary.

.getConstraints(
filter,
GeoWaveGTRasterFormat.DEFAULT_CRS,
// GeoWaveGTRasterFormat.DEFAULT_CRS,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented out code

PrimaryIndex[] indices = adapterMapping.getIndices(geowaveIndexStore);

if (indices != null && indices.length > 0) {
if (indices[0].getIndexModel() instanceof CustomCrsIndexModel) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this section could probably use GeometryUtils.getCRS(index) to reuse some code


// for first iteration
if (indexCrs == null) {
if (primaryindx.getIndexModel() instanceof CustomCrsIndexModel) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this whole method could probably be in geometryutils, and this section could reuse the GeometryUtils.getCRS(index) method

public static final PrimaryIndex DEFAULT_SPATIAL_TEMPORAL_INDEX = new SpatialTemporalDimensionalityTypeProvider()
.createPrimaryIndex(new SpatialTemporalOptions());
public static String CUSTOM_CRSCODE = "EPSG:3070";
// public static String CUSTOM_CRSCODE = "EPSG:3070";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented out code

"geotools-vector",
1);

// File configFile = File.createTempFile(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented out code

resizeTileSizeCoverageName);
command.getOptions().setIndexId(
TestUtils.createCustomCRSPrimaryIndex().getId().getString()
// TestUtils.DEFAULT_SPATIAL_INDEX.getId().toString()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented out code

Signed-off-by: Srinivas Varala <srinivas.varala@gmail.com>
geotiffFile);
}

/*
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented out code

}
catch (FactoryException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be logged, and remove TODO

Signed-off-by: Srinivas Varala <srinivas.varala@gmail.com>
@rfecher rfecher merged commit 1da75d9 into locationtech:master Mar 1, 2018
@rfecher rfecher deleted the raster-custom-projection branch March 1, 2018 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants