public DistanceCollector(Collector delegate, Point center, int hitsCount, String fieldname) {
this.delegate = delegate;
this.acceptsDocsOutOfOrder = delegate.acceptsDocsOutOfOrder();
this.center = center;
this.distances = new IntToDoubleMap( hitsCount );
this.latitudeValues = new IntToDoubleMap( hitsCount );
this.longitudeValues = new IntToDoubleMap( hitsCount );
this.latitudeField = SpatialHelper.formatLatitude( fieldname );
this.longitudeField = SpatialHelper.formatLongitude( fieldname );
}