CSVReader reader = null;
try {
g.setColor(Color.BLACK);
ILayer layer = getContext().getLayer();
IGeoResource resource = layer.findGeoResource(CSV.class);
if (resource == null)
return;
CoordinateReferenceSystem dataCRS = layer.getCRS();
CoordinateReferenceSystem worldCRS = context.getCRS();
MathTransform dataToWorld = CRS.findMathTransform(dataCRS, worldCRS, false);
ReferencedEnvelope bounds = getRenderBounds();
monitor.subTask("connecting");
CSV csv = resource.resolve(CSV.class, new SubProgressMonitor(monitor, 10) );
reader = csv.reader();
int nameIndex = csv.getHeader("name");
IProgressMonitor drawMonitor = new SubProgressMonitor(monitor, 90);