It sounds like your next step is to simply create a service with the desired capabilities enabled.
Open arcmap, add the data you want.
Symbolize and make it look like you want.
You might take a look at these web seminars and the esri video channel
when you publish your service you make sure to check the capabilities section and enable the desired output.
After selecting the desired capabilities go to each section and configure the options.
Then you will need to consume those services in your application/viewer of choice.
As per your follow on question about postgres (should probably be by itself).
Look in the \install dir\postgres\ver#\data\ folder for the pg_hba.conf
Edit the host section with your machine and connection type. There is some help in that file and more online.
The reason you're having so much difficulty using ArcGIS and PostgreSQL together is that you're not doing it right.
You've got three basic problems, in reverse order of severity:
- You're trying to mix-n-match PostGIS syntax with the
SDE.ST_Geometry
datatype
All database products have a mechanism for distinguishing between function libraries, principally by using database schemas to keep them separate. But because that can be tiresome (wise, but tiresome), they also provide a mechanism for specifying a preference. Unfortunately, PostgreSQL's error messages around this feature don't say "No, no, to use the sde.ST_Geometry
type, vice geometry
, you need to prefix the function with 'sde.
'"
- You're judging the Spatial Types and Functions standard against PostGIS
Esri was one of the first organizations to have standards-compliant geometry libraries in SQL databases, starting with DB2 and Informix (these date back to the same time when "SQL" was being added to PostgreSQL, and before PG support for ANSI SQL-92). Those libraries have been ported to all databases except Microsoft SQL Server (because it doesn't support datablade/extension/custom type libraries). PostGIS is standards-compliant, but they have scores more functions than that, mostly because they wanted to, and PostgreSQL was open enough for it to happen. Esri has a basic suite of functions that meet the standards, and type support across many RDBMS engines, some which have limits on the number of functions that can exploit custom types. It would be nice if Esri supported extra functions, but it is in no way a requirement to make effective use of the type. But consider this: The majority of extra PostGIS functions are for doing things that Esri has been doing for decades, and are available within Desktop (making them available to all RDBMS platforms, equally).
- You're not utilizing the out-of-the box capabilities of ArcGIS with PostgreSQL
In your question you state you want to use PostGIS and ArcGIS together. Well, starting at ArcGIS 10.4.0, you can, and you don't even need to enable an enterprise geodatabase to do so. You have two choices: You can use native RDBMS capabilities out of the box, with Query Layers accessing the tables for display and tables with PostGIS geometry created via SQL or read-write ArcGIS database access, or you can enable the enterprise geodatabase, and instruct ArcGIS to create PostGIS data by default by changing the GEOMETRY_STORAGE
keyword parameters to PG_GEOMETRY
(in fact, that's the only option in RDS instances, since Amazon doesn't allow the sde.ST_Geometry
function library to be installed in the black-box database). So it all comes down to what you want to do in this instance. ArcGIS doesn't care which methodology you choose (except that you won't get multiversion geodatabases, and geodatabase replication, and archive history, etc... without an enterprise geodatabase). Other than some quirkiness with Sort (Data Management) with PostgreSQL source tables, I haven't found any issues in PG interaction with ArcGIS 10.4.x.
Best Answer
First start PGAdmin III and right click on Databases:
Then in your 'new database' dialog select your PostGIS template:
Be sure to either change your sde_dbtune GEOMETRY_STORAGE to PG_GEOMETRY or use the PG_GEOMETRY keyword when creating feature classes.
Despite being able to connect to PostgreSQL, that only means the port is open, you might have trouble retrieving a feature class/dataset if you haven't installed the PG Client on the workstation side. Read more https://community.esri.com/thread/114415 - the version is not the ArcGIS version it's the PostgreSQL version.
Another trap for beginners is that each connected user should have their own schema to store large selections, if you don't create a schema for each login user they will receive an error (with an unhelpful error message) when they select more than a handful of records (I don't know the exact number).
I hope some of this information brings you less facepalm moments.
Edit
This is what I have in PostGIS template:
Perhaps you can make one by creating extensions in an empty database; I'd like to hear from anyone who has done so successfully.