Web Mapping Apps with Postgres + ArcGIS without ArcGIS Enterprise
Rhys Donoghue
MBA | Technology Leader | Full Stack Developer | Esri-certified system designer and developer
With the advances in open-source geospatial technology, a few of my clients have been looking for alternatives to ArcGIS Enterprise, and they have been asking me for ideas. Instead of recommending they stop using ArcGIS software, I have a hybrid solution, which means they can continue using ArcGIS Enterprise alongside this option, or they can work with this solution and ArcGIS Online, but without ArcGIS Enterprise.
To use this solution with ArcGIS Enterprise, for editable vector data and imagery, organisations may want to keep using ArcGIS Enterprise, and then for all of their readonly 2D vector data, they could use Postgres and PostGIS directly. This means they could continue using ArcGIS Server but reduce the number of licenses they need, and hence reduce their costs. On the other hand, if a client does not have ArcGIS Enterprise but wants to use an enterprise spatial database, then this could be a good cost-effective option.
There are a few reasons why I built this solution:
How does data get into ArcGIS web mapping apps now:
The ArcGIS Maps SDK for JavaScript is really nice. Esri have done a great job here. It supports many different data formats. Two of the common ways data is added to an ArcGIS web app is via map and feature services that are published via ArcGIS Enterprise. Alternatively, data can be published to ArcGIS Online. ArcGIS Enterprise is generally a lot more expensive than ArcGIS Online for smaller organisations, and as organisations get much larger, ArcGIS Enterprise can become more affordable than ArcGIS Online.
What have I built:
Originally, I wanted to get spatial data from an enterprise database into ArcGIS Online without the high cost for ArcGIS Enterprise. I also wanted our QGIS users to be able to connect directly to my enterprise spatial database. Postgres was the obvious choice for this - Esri, Carto, Mapbox, and others, all use Postgres for managing spatial data. I did not want to use GeoServer (open source) because I wanted a "lighter" solution, and I did not want a traditional map server like GeoServer or ArcGIS Server. I also wanted to remove the "publishing" process that is sometimes too time-consuming with ArcGIS Server and ArcGIS Online. So, I used FastAPI to connect directly to Postgres to create feature services, without actually needing to publish the services. I then tested this with ArcGIS Online and it works perfectly. It took only a few hours to get a proof of concept working.
领英推荐
What's next:
I am adding vector tile support and OAuth2 support, so I can start migrating some of my hosted ArcGIS Online services to this Postgres + FastAPI solution. I am planning on making all of my code open source, so that anyone can use it. Before I do that, I need to talk with Esri to make sure they don't see any issues with me making the code open source. If you work at Esri and are the right person for me to talk to, please send me a message.
For the pro-Esri guys who have questions:
Is anyone using this in a live production environment?
Yes, our team built the ReefCloud Dashboard with the Australian Institute of Marine Science and Accenture. Some of the services for the ReefCloud Dashboard were custom services that we set up that were using very similar logic to load data live from Postgres. We have other clients using this too, and we also have other live apps that we can demo if you contact us via our website https://kdrm.io.
Demo
To see a very basic video demo, check this: https://www.youtube.com/watch?v=ORI3IzdfRuI&feature=youtu.be. This is using data downloaded from Esri's SampleServer6 REST Services Directory. The data in the demo is coming from a local Postgres database, and is loaded directly into the web app via Python and FastAPI.
For a live demo or for any questions, please contact us via our website here: https://kdrm.io
Rhys Donoghue I can see you are using the same stack as pygeoapi maybe you can develop a pygeoapi plugin formatter that serves out ESRI Rest Geservices
Senior Geospatial Analyst at Timberlands Ltd NZ
1 年We encourage our contractors to contribute/collect data using ESRI field apps. However, they need editing licenses to do so and the cost of extra editing licenses are too high and makes it not cost effective. I do like ESRI products.
Developer Relations Lead Engineer, Developer Experience at Esri | Opinions = my own ??
1 年That's cool Rhys Donoghue. I'm not sure, but as you know, we maintain https://koopjs.github.io which is a similar idea but using Node.js ?? // cc: Andrew Turner Richard Gwozdz
Rhys Donoghue this tool is quite impressive indeed. Was there any reason for not using/extending koopjs. It would be interesting to know
?? ?? Gerente del área de Tecnología e Innovación ?? Esri Espa?a - Presidente de Metabolicos.es ??????
1 年Raul Martinez Fernandez, PMP Raúl Jiménez Ortega Libertad Chapinal Cervantes