3
votes

I'm researching Umbraco for use as a base in a large CMS project, however the project calls for the SQL Server 2008 database to store spatial data against content.

Being new to Umbraco I'm still reading through the documentation and slowly building up an idea of it's architecture. However so far it doesn't look like Umbraco supports the storage of spatial data.

There only appears to be four database datatype options: date, integer, ntext, nvarchar

Is it possible to store spatial data to the database?

Update: Futher research into how Umbraco works has showed me I was on the wrong track. It seems the way to do this is store the lat/long data in the data inside the usual XML format Umbraco uses.

Then to use the Spatial.net extensions that have been built on top of Lucene.net, rather than use the limited search capabilities Examine exposes.

However this is all still theoretical, I've just not been able to achieve this. If I do before someone answers this question, I'll post my findings here to help others.

2
It seems the more I learn about Umbraco, the more it seems I'm looking at this the wrong way. Which unfortunately means I won't be able to use SQL Server 2008's built in spatial datatype and associated features.Peter Bridger

2 Answers

1
votes

You could take a look at how to make user controls (with Visual Studio) in Umbraco.

It is also possible the versatility in Umbraco 'Document Types' is enough for you.

It is possible to extend Umbraco in any sort of way to get the solution you want. I don't know how you want the spatial data to interact with your frontend - so it is difficult to provide a direct solution.

1
votes

Although there are ways to store spatial data and perform queries against it using Spatial.net, it's not a very elegant solution.

Instead I've created an additional table in SQL Server 2008 with the geometry/geography datatype and a reference to the Umbraco content it's connected with.

I've then got a event hook which updates this whether content is added/updated/deleted.