开发者

Umbraco: Storing spatial data

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 tha开发者_高级运维n 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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜