0

I am new to both GeoServer and shapefile, today only I installed (GeoServer) on my CentoOS, I am familiar with Leaflet, I am looking for solution to draw huge cruise track which are already there in both database (mariadb) as well as in CSV file

So currently situation is like this, I have CSV file with many columns examples

latitude    longitude   track_id
-35.325     90.125      c1
...         ...         c1
....        ...         c1
-35.31      90.126      c2
...         ...         c2
....        ...         c2

I would like to use them in Leaflet like below, and want to show cruise track

http://{s}.somedomain.com/blabla/{z}/{x}/{y}.png

So my question is

  1. How do I convert these data to shapefile and deploy them in GeoServer

    ( what are the tools I can use preferebly CLI to convert CSV to shapefile )

  2. So within GeoServer is it possible to retrieve cruise track of individual trackid using some query like below at least REST API

http://{s}.somedomain.com/blabla/c1/{z}/{x}/{y}.png
                                 ^
                           Here c1 is trackid, 
                          serve cruise track from track id c1
Vince
  • 20,017
  • 15
  • 45
  • 64
user3637224
  • 103
  • 3
  • Welcome to GIS SE. As a new user, please take the [Tour], which explains how our Focused question/Best answer model operates and emphasizes the importance of asking One question per Question. Please [Edit] your question to focus on your most pressing issue. – Vince Jul 24 '19 at 12:38
  • GeoServer doesn't need shapefiles to be able to serve data out in a format to be used in Leaflet. – nmtoken Jul 29 '19 at 13:03

1 Answers1

0

Here are some options:

  1. Use QGIS to convert .csv to shapefile (do a web search on this you'll find many tutorials and q/a)
  2. Once the shapefile is served out through GeoServer as a WFS you may use CQL REST queries to return features by id or various other attributes:

https://docs.geoserver.org/stable/en/user/services/wfs/reference.html

https://docs.geoserver.org/latest/en/user/tutorials/cql/cql_tutorial.html

artwork21
  • 35,114
  • 8
  • 66
  • 134
  • Thank you, but QGIS has CLI ?, I have nearly around 300 files, bath processing is available ? also I want to make multiline string. – user3637224 Jul 25 '19 at 04:05
  • QGIS does have a python window for running python commands/data conversions. Also the pyqgis python module has methods for creating line features from point coordinates. https://gis.stackexchange.com/questions/60307/how-can-i-create-a-line-with-three-points-with-python-in-qgis – artwork21 Jul 30 '19 at 12:50