Updating from arcsde to arcserver

05-Jul-2016 17:52 by 4 Comments

Updating from arcsde to arcserver

When a feature is updated or inserted, it is visible to the client upon map refresh (caused by pan, zoom, or refresh map commands).

Both products work very nicely (I've used them both) but can be too costly for many organizations.Real-time data is becoming more and more prevalent in the world around us and therefore in greater demand within GIS applications.So how can real-time data be pushed to an Arc SDE geodatabase?By default, Arc SDE databases in SQL Server use the Arc SDE compressed binary type for feature geometry storage within the SHAPE field.To use the Microsoft geometry and geography data types instead for feature geometry storage, we need to specify them when creating our feature class.The coordinate string is followed by the spatial reference identifier (SRID), which in this case is EPSG:4326, WGS84.

BEGIN INSERT INTO [City].[dbo].[Tracts] ( OBJECTID, TRACT_ID, TRACT_NAME, SHAPE ) SELECT 1,1000,'Smith', geography:: STPoly From Text( 'POLYGON( (-77.0532238483429 38.870863029297695, -77.05468297004701 38.87304314667469, -77.05788016319276 38.872800914712734, -77.05849170684814 38.870219840133124, -77.05556273460388 38.8690670969385, -77.0532238483429 38.870863029297695 ))', 4326) END0x E61000000104060000008610937078EF42400 0000005684353C07C7BB9E0BFEF4240010000E D7F4353C0174EBCF0B7EF42400100004FB44353 C0DFD91C5D63EF424000000054BE43530033973 DEF4240000000578E4353C08610937078EF4240 00000005684353C001000000020000000001000 000FFFFFFFF0000000003 What about that SHAPE field data?

BEGIN UPDATE [City].[dbo].[Tracts] SET SHAPE = geography:: STPoly From Text( 'POLYGON( (-77.0532238483429 38.870863029297695, -77.05468297004701 38.87304314667469, -77.05788016319276 38.872800914712734, -77.05849961836481 38.869157633013312, -77.05556273460388 38.8690670969385, -77.0532238483429 38.870863029297695 ))', 4326) WHERE TRACT_ID = 1 END In addition to adding and updating features, SQL Server has many other spatial functions such as the ability to perform spatial analyses.

SQL Server 2008 includes support for methods that are defined by the Open Geospatial Consortium (OGC) standard and a set of Microsoft extensions to support that standard.

By utilizing the SQL Server geometry and geography data types, SQL stored procedures, and triggers, we can essentially bypass the Esri Arc SDE stack and push attribute and spatial updates directly to nonversioned feature class tables.

Simple to complex insertions and updates can be performed through SQL, allowing us to provide (upon map refresh or redraw) instant feature class updates to end users.

Since we cannot change the geometry field type of an existing feature class, we will create a new feature class and specify the GEOGRAPHY configuration keyword during the process.