How to get geometry data from external database dynamically

1145
13
Jump to solution
10-28-2022 12:54 AM
EmrahAydemir
New Contributor III

Hi, i have a PostgreSQL database. Hundreds of geometry data are added to this database daily, independent of Arcgis. There is a geometry column with Postgis feature. Is there a way to dynamically pass the data here to Arcgis Server? I want to display the data (inserted from NodeJS server) in Arcgis Server Map Server.

 

Note: i added PostgreSQL Database to Arcgis Server as a data store .

1 Solution

Accepted Solutions
RamakrishnaBillakanti
Occasional Contributor

Possibly your PG is configured as open to accept any connections. I think you are good to go now. Are you able to see the data when a map service is published. 

View solution in original post

0 Kudos
13 Replies
George_Thompson
Esri Frequent Contributor

I think that you would need to create a map / feature service to display that data. I believe that you would also need to publish this from ArcGIS Pro.

Do you have ArcGIS Pro to create a map that you want and then publish from there?

--- George T.
0 Kudos
EmrahAydemir
New Contributor III

Hello, with arcgis I can move data to arcgis server in few steps. But since hundreds of layers will be added per day, I will not be able to do this every time a layer is added. Isn't there a way to add a map server to Arcgis Server and connect it directly to the external database? Since I am using a Postgis database, I already have a geometry column. It is enough for me to just transfer the data in this table exactly.

0 Kudos
George_Thompson
Esri Frequent Contributor

If I understand what you are saying, you would like a way to add all the new "layers" (spatial tables) that are added to the PostgreSQL DB, correct?

If so, I think that you still have to publish the data from ArcGIS Pro. I am not aware of a way to just take a new spatial table added to the DB to just be added to the server as a service without Pro. I would wait to see if any other users may have a way to do this.

--- George T.
0 Kudos
EmrahAydemir
New Contributor III

Yes that's true. I have a Postgis database with geometric data in it. I want to query these data directly over Map Server. I thought it might be possible via the Data-Store, but I guess I'm wrong. It's like connecting the database directly to the Map Server instead of connecting the database to Arcgis, transferring the layers, and then publishing it to the Map Server.

0 Kudos
RamakrishnaBillakanti
Occasional Contributor

Register your datastore in postgress with ArcGIS Server. If ArcGIS Server is not whitelisted on pg hba(or similar) conf file, whitelist it so postgress can accept connections from your ArcGIS Server Host Machine. You should be able to publish it and use it with a map service. 

0 Kudos
EmrahAydemir
New Contributor III

I'm confused at this part. My Postgis database is on an external server. I added my database to the Data-Store. There is a green tick next to it. Does this mean I have successfully added (in terms of whitelisting)?

EmrahAydemir_0-1666959484162.png

 

0 Kudos
RamakrishnaBillakanti
Occasional Contributor

Possibly your PG is configured as open to accept any connections. I think you are good to go now. Are you able to see the data when a map service is published. 

0 Kudos
EmrahAydemir
New Contributor III

I don't know what to do next step. After adding the database how do I add it to a Map Server?

0 Kudos
RamakrishnaBillakanti
Occasional Contributor

You need to publish the layer/table using ArcMap or ArcGIS Pro depending on your ArcGIS Server Version.  Once published you will be able to view the data through map service. 

 

Publish a map service from ArcMap—ArcMap | Documentation (arcgis.com)

0 Kudos