User Tools

Site Tools


publisher:mapping_a_csv

This is an old revision of the document!


Publishing Map files on SD

Who is this guide for

This guide is for publishers who would like to display a map file on SmartDublin. They already have a CSV file that includes latitude and longitude values.

What this guide teaches

  • How to upload KML files to the Geoserver and Datastore so that they can be published as maps
  • How to copy styling from a similar dataset
  • How to fix simple error (zero error) encountered when uploading

Things to know beforehand

You must know how to upload resources to SmartDublin.

Currently (July 2021), SmartDublin requires a KML file to publish as a map (not currently a Shapefile).

  1. To generate a KML from an Excel or CSV file use one of the online converters, eg. CSV To KML Converter
  2. You will be asked to identify any name/description field(s) and the latitude/longitude columns by column number.
  3. Convert the file then download the resulting KML file and upload it to the dataset on SmartDublin where you have published the CSV file

Uploading the data to the Geoserver and Datastore

To display a map, the data needs to be available in the Geoserver and the Datastore.

  • Click on the resource and there should now be a link to “Import GeoData”
  • Click on this link to upload the data to the Geoserver and the Datastore

  • You will be asked about the EPSG code, click OK to accept the default value

  • You should get the following message, confirming that the data has been submitted to the Datastore and Geoserver:

If it does not load correctly, see error on csv upload to geoserver

  • You should now see 2 new resources on the dataset, one labelled with “Datastore via GeoServer”, the other “Web Map Service in GeoServer”:

  • And if you refresh the dataset, the map should display by default.

Copying styling from an existing dataset

As you can see, this map is not very useful. You may want to style it, that is, use CMS styling to improve the way it displays. For Smart Dublin we are going to use common styling for harmonized datasets across the local authorities so you may be able to just copy an existing style.

  • Go to the associated dataset that has already been styled
  • Open the “Web Map Service” resource and click on the “Edit Style” button

  • Click into the styling code and use CTRL-A, CTRL-C to copy the code
  • Leave that page without making any changes
  • Navigate to your original dataset and select the “Web Map Service” resource
  • Click on “Edit Style” and use CTRL-A, CTRL-V to paste in the code from the other dataset. Use the “Change Style” button to save the new style:

  • You should now see a success message:

  • Now return to the dataset page and refresh it – you should now see the results of the styling:

  • If the page does not change, try refreshing it again or loading a private window - it should update
publisher/mapping_a_csv.1626714252.txt.gz · Last modified: 2021/07/19 17:04 by admin