This techniques gives us a little more control over Things is with a map of connection parameters. How many other side car files are there?Īdvanced: The use of FileDataStoreFinder allows us to work easily with files. The sampleĭata set includes shp, dbf and shx.
Try and sort out what all the different “side car” files are - and what they are for. Press Alt-Enter (^-Enter on OS X) to bring up a dialog to import the missing class.
This code won’t compile initially because we’re missing an import. * * This is the GeoTools Quickstart application used in documentationa and tutorials. * */ package import java.io.File import import import .SimpleFeatureSource import import import import import import import .JFileDataStoreChooser /** * Prompts the user for a shapefile and displays the contents on the screen in a map frame. See the GNU * Lesser General Public License for more details. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* * GeoTools - The Open Source Java GIS Toolkit * * * (C) 2019, Open Source Geospatial Foundation (OSGeo) * * This library is free software you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation * version 2.1 of the License. You can run App or AppTestīy right clicking on them in the Project Explorer and choosing Run from the context menu. IntelliJ has created an empty App.java with a simple Hello World! along with a JUnit test case. Our POM file and automatically import them. Let’s turn that on for the purposes of this tutorial, it will automatically detect changes we make to IntelliJ should also ask if you want to enable Auto Importįor Maven dependencies. (let this finish before attempting the next steps, it shouldn’t take long). IntelliJ will show us our newly created Maven file and do an initial Maven build Hit finish and our new project will be created. You can change the project location to suit your needs and hopefully leave More Settings as their defaults (recommended) Give the project a name (this name is only used internally by IntelliJ), tutorial should work for our For our purposes IntelliJ’s bundled Maven should beįine, unless the version is lower than 3, in which case you should consider using a new external version.
The following screen we should be able to leave with the defaults. The next screen asks us for basic identifying information for our project: In the New Project dialog choose Maven project, ensure Create from archetype is selected,Īnd choose the :maven-archetype-quickstart archetype. To start with we’ll create a new project using the Maven quickstart archetype.Ĭhoose File -> New Project from the menu.