I have an existing table in my SQL database for buildings. This table was already populated with numerous records before GIS was considered. I would now like to add a geometry column so we can store the building footprints. How do you "update" or add geometry to an existing record? I only see the ability to create "new" features for points, lines, and polygons?
Map somehow requires a geometry which you can display in Map and modify. If you have records without any geometry it seems you can't add a geometry für a specific record, you can only create new records including an new geometry.
If you use Map Industry Models you can create a geometry for an existing record without geometry.
But I suppose you don't use IM. The only thing I can think of right now is to create a dummy geometry for all records in SQL Server using plain SQL. You can then connect to the table in Map and modify the shape of the object as desired.
Good luck, Rob
go the other way. new FDO with geometry and one column in the data table the holds the id for the data in you current table. join the current table to the new one and the result will be geometry with your current data attached.
you may have to do some map import and export and/or bulk storage saves to get the result into the format you want to work with
Thanks for the responses. We do plan to use an industry model in the future but we are not ready to make the move yet.
This option to create a temporary FDO table to store the geometry and join it to my existing table sounds intriguing. Can you explain this idea more? After I join then how exactly do you transfer the geometry data from one table to the next?
I'm not sure about the suggested workflow but if you create a new temporary table in SQL server to capture the geometry you could use plain SQL (update) later on to transfer the geometry from the temporary table to the main table (as long as you have ids to link both).
Our SQL DBA is encountering an issue trying to copy the geometry from our temp table into the new table with existing records. The UPDATE function is returning the error: "A .NET Framework error occurred during execution of user defined routine or aggregate 'geometry'." This appears to be because of the way SQL is storing the point geometry data saved from Map, which looks like this: 0x00000000010C6C29E78B25B43841FE23D34D43113B
I think SQL wants it in the format 'POINT (0 0)'. Has anyone else tested copying geometry from one table to another in SQL Server?
I'm not familiar with SQLServer but I think you need to use a function to convert the internal format (e.g. 0x00000000010C6C29E78B25B43841FE23D34D43113B41) into a spatial data type. The spatial data type can the be used for updates or inserts.
Here is an example which should be similar to your situation:
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register