Package gistoolkit.datasources

Examples of gistoolkit.datasources.GISDataset


                   
                        // find all the shapes within this distance.
                        Layer tempLayer = getGISDisplay().getSelectedLayer();
                        if (tempLayer != null){
                            // get the dataset from this layer
                            GISDataset tempDataset = tempLayer.getDataset();
                            GISDataset tempSelectedDataset = new GISDataset();
                            for (int i=0; i<tempDataset.size(); i++){
                                gistoolkit.features.Shape tempShape = tempDataset.getShape(i);
                                if (tempShape != null){
                                    if (tempShape.getDistanceToPoint(tempPoint.getX(), tempPoint.getY())<tempDistance){
                                        tempSelectedDataset.add(tempDataset.getRecord(i));
                                    }
                                }
                            }

                            // set the selected records.
                            ((SelectPointModel) inDrawModel).setSelectedLayer(tempLayer);
                            ((SelectPointModel) inDrawModel).setSelectedRecords(tempSelectedDataset.getRecords());
                        }
                        else{
                            JOptionPane.showMessageDialog(getGISDisplay(), "Please select a layer.", "Layer not selected", JOptionPane.ERROR_MESSAGE);
                        }
                    }
View Full Code Here

TOP

Related Classes of gistoolkit.datasources.GISDataset

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.