0

I have a set of polygon data express in lat long. I would like to perform some tasks (polygon buffering, inflating etc etc ..) in server side and output the result to client side (client is a web page... maybe use leaflet to display the data).

I am new to GIS.

3
  • You could also use something like turf to do these operations on the client side. Apr 23, 2015 at 5:42
  • What language are you using server-side?
    – Alex Leith
    Apr 23, 2015 at 6:48
  • The app may need to calculate many polygons at the same time, seems it is better to run in Server side..
    – kkkkky
    Apr 23, 2015 at 7:50

2 Answers 2

2

The answer to your question is yes. You might like to clarify what kind of server-side software you have.

You can use GeoServer to do WPS requests.

You could use a Python library like Shapely.

Or a C# library, or a Java library, or a JavaScript library.

Or the QGIS API, or the ArcGIS API or the database, be that SQL Server, PostGIS or Oracle.

So, to answer your question again. Yes, you can do spatial operations server-side.

2
  • What programming language are you using?
    – Alex Leith
    Apr 23, 2015 at 6:46
  • I am working on Linux environment, mostly use PHP, Python, Shell. As I am not familiar with GIS DataBase, may I ask is it a must to use DB ?
    – kkkkky
    Apr 23, 2015 at 7:48
1

You can use turf.js in client side (as Devdatta said) but also on the server. It requires nodejs and spatial data in geojson format, the perfect format if you like to render it on a leaflet map.

You can install just the modules that you need:

Buffer: turf-buffer

Merge: turf-merge

Overlap: turf-overlaps

Here is an example with node

1
  • Thank you so much for your help with this!! Let me try and implement this out!!
    – kkkkky
    Apr 24, 2015 at 6:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.