Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have an ArcSDE feature class that contains project points based on xy data from an external SQL databaes. (Not a geodb). I am looking for the best way to "recreate" the ArcSDE feature class from the external data on a daily basis. The external database is not not connected to ArcSDE and projects may be added or removed from the external database, which needs to be reflected in the ArcSDE feature class.

Thank you,

Steve

share|improve this question
    
Are you wanting to do this programmatically (assuming so since it is tagged as Python)? –  Chad Cooper Feb 9 '11 at 19:00
    
Is the point data in SQL server contained in spatial (geometry or geography) columns? –  Kirk Kuykendall Feb 10 '11 at 15:14

2 Answers 2

up vote 2 down vote accepted

If you are using ArcGIS 10, you don't have to copy the data. You can use a Query Layer to access the non-SDE table. If your database has a supported native spatial type (such as Oracle Spatial or PostGIS), you can use the native spatial type as an ArcGIS compatible geometry. You can also use the Create XY Event Layer to convert non-spatial tables to a feature class.

If you need to do all of this programmatically, you can save the Query Layer as a .lyr file. Then you should be able to load into python, create an XY Event Layer, and then export the resulting layer to a geodatabase.

share|improve this answer
    
As an update: I attempted to create a query layer in against a spatial table containing point data in SQL Server 2008. Attempting to display the data only works for extents which cover less than half the globe due to a current limitation of sql server spatial types. –  Steve Mar 9 '11 at 20:03
    
@Steve, yes, the SQL Geography type has the limitation you describe. Ed Katibah didn't think this capability was needed for some reason. If you use the Geometry, it should work... but you lose the geodesic calculation capabilities. –  James Schek Mar 14 '11 at 22:50
    
Thanks James. I was sidetracked from this for a couple of weeks and coming back to it now. If I use the geometry type and access the data through ArcGIS server or ArcMap, I would still have geodesic calculations available through the ESRI apps, just not through SQL Server directly, correct? –  Steve Mar 31 '11 at 15:21
    
Yes, the geodesic-aware tools should still work with through the ArcMap, Engine, Server, etc. –  James Schek Apr 8 '11 at 16:43
    
Fantastic... I'll give that a try! –  Steve Apr 9 '11 at 17:14

Why recreate featureclass?you can read records from external DB and update your featureclass in ArcSDE without having to drop and recreate it.Even you can create a shape file from all records in external DB,load it into your GIS application(for example ArcMap) and then intersect (or use others spatial relations like "idntical") with your feature class,then invert selection and use new selected feaures from shape file(those which are not intersect or identical to featureclass) and insert them into feature class to update it.

share|improve this answer
    
How do I update the feature class in ArcSDE? I wasn't aware that was a possibility! –  Steve Feb 10 '11 at 12:39
    
To add further background, our researchers update the data in a non-gis database. New projects are added with x/y lat lon that I would then have to add to the feature class in ArcSDE. –  Steve Feb 10 '11 at 12:41
    
You can use the arcpy/arcgisscripting module to create and edit feature classes in SDE. –  DavidF Feb 10 '11 at 14:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.