Skip to main content
added 350 characters in body
Source Link
Regina Obe
  • 10.6k
  • 1
  • 24
  • 28

Well even a GeoServer service you are going to have to feed with data. That could mean just linking your shapefiles and not loading them or loading them in PostGIS and pointing GeoServer at them.

In the end I think you have the greatest breath of flexibility with having your data in PostGIS if you plan to do more than render them because GeoServer would still be limited to what it can do with shapefiles.

That said, for this kind of problem my go to solution is:

Front end something like Leaflet or OpenLayers (with AngularJS or JQuery).

Back end: PostGIS, with middleware between either being (PHP, Node, or ASP.NET),

and then I just create functions in PostGIS that take input args (usually as json because AngularJS automatically converts forms to JSON and JQuery can too), select the bits from the JSON input, output a GeoJSON feature collection which both Leaftlet and OpenLayers know what to do with.

It avoids the need of yet another service like GeoServer.

Now if I need serious styling, then I go to GeoServer and MapServer for help.

I forgot to add, that our upcoming book, in draft on pgRouting - https://locatepress.com/pgrouting covers this approach (using PHP, Leaflet, AngularJS, and PostgreSQL stored functions that use PostGIS and pgRouting functions. The source code you can find here: http://www.postgis.us/downloads/pgr_1e/pgr_1e_code_data.zip (in folder code/app)

Well even a GeoServer service you are going to have to feed with data. That could mean just linking your shapefiles and not loading them or loading them in PostGIS and pointing GeoServer at them.

In the end I think you have the greatest breath of flexibility with having your data in PostGIS if you plan to do more than render them because GeoServer would still be limited to what it can do with shapefiles.

That said, for this kind of problem my go to solution is:

Front end something like Leaflet or OpenLayers (with AngularJS or JQuery).

Back end: PostGIS, with middleware between either being (PHP, Node, or ASP.NET),

and then I just create functions in PostGIS that take input args (usually as json because AngularJS automatically converts forms to JSON and JQuery can too), select the bits from the JSON input, output a GeoJSON feature collection which both Leaftlet and OpenLayers know what to do with.

It avoids the need of yet another service like GeoServer.

Now if I need serious styling, then I go to GeoServer and MapServer for help.

Well even a GeoServer service you are going to have to feed with data. That could mean just linking your shapefiles and not loading them or loading them in PostGIS and pointing GeoServer at them.

In the end I think you have the greatest breath of flexibility with having your data in PostGIS if you plan to do more than render them because GeoServer would still be limited to what it can do with shapefiles.

That said, for this kind of problem my go to solution is:

Front end something like Leaflet or OpenLayers (with AngularJS or JQuery).

Back end: PostGIS, with middleware between either being (PHP, Node, or ASP.NET),

and then I just create functions in PostGIS that take input args (usually as json because AngularJS automatically converts forms to JSON and JQuery can too), select the bits from the JSON input, output a GeoJSON feature collection which both Leaftlet and OpenLayers know what to do with.

It avoids the need of yet another service like GeoServer.

Now if I need serious styling, then I go to GeoServer and MapServer for help.

I forgot to add, that our upcoming book, in draft on pgRouting - https://locatepress.com/pgrouting covers this approach (using PHP, Leaflet, AngularJS, and PostgreSQL stored functions that use PostGIS and pgRouting functions. The source code you can find here: http://www.postgis.us/downloads/pgr_1e/pgr_1e_code_data.zip (in folder code/app)

Source Link
Regina Obe
  • 10.6k
  • 1
  • 24
  • 28

Well even a GeoServer service you are going to have to feed with data. That could mean just linking your shapefiles and not loading them or loading them in PostGIS and pointing GeoServer at them.

In the end I think you have the greatest breath of flexibility with having your data in PostGIS if you plan to do more than render them because GeoServer would still be limited to what it can do with shapefiles.

That said, for this kind of problem my go to solution is:

Front end something like Leaflet or OpenLayers (with AngularJS or JQuery).

Back end: PostGIS, with middleware between either being (PHP, Node, or ASP.NET),

and then I just create functions in PostGIS that take input args (usually as json because AngularJS automatically converts forms to JSON and JQuery can too), select the bits from the JSON input, output a GeoJSON feature collection which both Leaftlet and OpenLayers know what to do with.

It avoids the need of yet another service like GeoServer.

Now if I need serious styling, then I go to GeoServer and MapServer for help.