Web Mapping Apps with Postgres + ArcGIS without ArcGIS Enterprise
Loading Postgres data directly into an ArcGIS Maps SDK for JavaScript app without ArcGIS Enterprise

Web Mapping Apps with Postgres + ArcGIS without ArcGIS Enterprise

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:

  1. My clients were asking for it.
  2. I needed ArcGIS Enterprise for my own work, but it is too expensive for me to buy.
  3. I have a lot more flexibility with integrating with third-party systems like SAP.
  4. I was curious how fast it would take for me to write code to get data directly from Postgres into ArcGIS Online via live services. It only took me around 2-3 hours.

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:

  1. I am also pro-Esri. I am not doing this to compete against Esri. I am doing it because I have clients who have asked for it (they are already trying to do this themselves), and I also need it for my work. I am also pro-ArcGIS-Online. I expect to get more clients onto ArcGIS Online because of this. I am not trying to get clients off ArcGIS software, I am trying to offer a hybrid solution that will help Esri keep those clients who are looking at moving off ArcGIS software because it is getting too expensive.
  2. For anyone who has security concerns, this solution supports OAuth2 and it will integrate directly with ArcGIS Enterprise security too. Send me a direct message and I can talk through some of the details with you.
  3. Some of my clients are already building their own Postgres solutions like this. They are not pro-Esri, and I am pro-Esri, so I am trying to find a happy hybrid for them, so that Esri does not lose them as clients.

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

回复
Lan Nguyen

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.

Raúl Jiménez Ortega

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

Aitor Calero

?? ?? Gerente del área de Tecnología e Innovación ?? Esri Espa?a - Presidente de Metabolicos.es ??????

1 年

要查看或添加评论,请登录

Rhys Donoghue的更多文章

社区洞察

其他会员也浏览了