Tuesday, May 22, 2007

Microsoft Spatial - Hot off the Press!

Microsoft Spatial – Hot off the Press

From the SQL Server User Group Meeting - Thursday 17 May



Microsoft Spatial – Hot off the Press!

  • SQL Server Spatial & Virtual Earth
  • SQL Server User Group
  • May 2007
  • “Matty” from e-Spatial

Introduction – e-Spatial

· NZ’s premier location intelligence specialists

· True integrators:

§ Mapping engine

  • Address specialist
  • E-Government specialists

Introduction – Where is the Industry Now?

· Spatial has reached the mainstream

· Spatial databases and data warehouses – all vendors support them, or do they?

· AJAX mash-ups are everywhere – international solutions as well as local, but how to make money from them?

· Location Intelligence – a natural extension to Business Intelligence. SQL Server Spatial was announced at the Seattle BI conference last week

· Image and vector – two types of spatial data

· 2D, 3D (Z) and 4D(M) – use of multi-dimensional data

· Various spatial standards now in use

Spatial in SQL Server – Standards

· Support for several OGC Specifications

§ Geometry data type will comply with Simple Features for SQL

§ Can store Geography Markup Language (GML) in SQL Sever with existing XML data type

§ Can use Well-Known text and Well-Known Binary (WKT, WKB) for data transfer and access

· Other OGC standards

§ Styled Layer Descriptor

§ Web Feature Services (WFS)

§ Web Map Service (WMS)


Spatial in the database

  • Spatial objects
    • Points – point(X,Y)
    • (Multi) lines – line (point (x1, y1), point(x2, y2),)
    • (Multi) polygons – polygon (line (…), line (…),)
  • Geometry data type
    • Object definition (using points, lines and polygons) and type
    • Geometry collections
    • Project and datum
    • Default style (colour, thickness, pattern)
  • Spatial indexing – R-tree or Quad-tree (or Bi-tree)
    • SQL Server Spatial will use a 4-stage grid (like Quad-tree)
  • Spatial functions – intersects, touches, centroid (100+)…
  • XY Layers

Spatial in the database

  • This example map includes:
    • Properties
    • Address
    • Street
    • Postcode
  • Database tables would be:
    • Properties (100)
    • Address (80)
    • Street (20)
    • Postcode (1)
  • Relational data model:
    • Very complicated
  • Relational spatial can be complicated (overlaps) as typically 50+ layers in a map!

Spatial in SQL Server

  • SQL example: “In postcode 4102 show all properties with addresses on Van Asch Road”
  • No need to define many-to-many relationship tables, nor foreign-key links
  • Data maintenance much easier
  • Most line-to-point relationships are not spatial (point is not usually on a line), but a spatial relationship can be achieved using a buffer
  • SQL example: “Show all properties within 10 metres of Van Asch Road”
  • The buffer query applied a 10m buffer to the whole Van Asch Road
  • Buffer example – now included the area of the property
  • SQL example: “Show all properties and their area in square metres within 10 metres of Van Asch Road”
  • The returned properties are also ordered by largest area
  • We could continue – for example to do an intersect from the properties to surrounding properties (hazardous substance burning on the road)
  • Large fire (200m radius) on a given property
  • Let’s find its nearest neighbours

Uploading spatial data – Overview

  • Option 1: use data uploaded (“ETL”) facilities from external mapping vendors
    • Safe Software FME – will support uploading data in almost all formats
    • MapInfo EasyLoader – will support uploading MapInfo and some other major spatial formats
    • ESRI ArcGIS – will support uploading ESRI format
    • Freeware and Open Source upload plug-ins
  • Option 2: use Microsoft SSIS (Integration Services) to upload with WKT or WKB
    • Lots of methods/functions in SL Spatial to migrate spatial data
  • Option 3: create SQL to insert all data

Option 2: Upload spatial data with SSIS

  • SQL Server Spatial supports the OGC (Open Geospatial consortium) standards WKT and WKB for import/export
  • Also support importing and exporting OGC GML data
  • Most spatial data vendors and databases support these standards, allowing upload of their spatial data
  • Example: Create SpatialTable and populate it with ID, GeomText (WKT format) and null Geometry:
    • CREATE TABLE SpatialTable (id INT IDENTITY (1,1), Geometry geometry, GeomText as VARCHAR(2000));
  • Update the geometry with a spatial function:
    • Update SpatialTable ST set ST.GEOMETRY = ST.GEOMETRY.STGEOMFFROMTEXT(ST.GEOMETRY)

Accessing spatial data:

  • SQL Server Spatial does not include a map viewer!
  • Fast Access: use a mapping engine with off-the-shelf access
  • Slower Access: build your down data provider using WKT or WKB
  • Web services: several examples available for building web services interfaces between spatial data base and mapping engine

Image and vector data

  • As defined previously, vector data stores all points for spatial objects point, line or polygon)
  • Image data is stored as tiles, so only the lower-left and upper-right XY pair need to be recorded
  • In NZ we often use metre-based coordinate systems (projects) – NZTM or NZMG

Examples, Blogs and Announcements

Thursday, May 17, 2007

Minutes of Workgroup Solutions Team Day

WST Team Day

Tuesday 15 May 2007

Round Table - All

  • Application Linker
    • Could be turned into a Vista Gadget?
  • Working together
    • Can Tim help me with UPC?

Server Migration – David Bulog

  • Budget $350K
    • 5 new boxes = “blade” servers
    • 3 old boxes = DR
  • Can DR servers be set up with Replication?
    • No they can’t
    • Not allowed to be hot-swappable
    • Budget constraint
  • Windows Server 2003
    • Is IIS6 standard?
    • Is IIS7 a Service Pack upgrade?
  • Move DTS package from PROD to SSIS on DEV (can still push to PROD).
    • Send to Dave?

Word from the Top – Murray Mitchell

  • Structural Changes
    • Wellington App Dev Manager role happening “soon” (2 weeks)
    • Capability (training) Manager also happening tomorrow
    • Identity and Access Management – Meta-directory (Novell product) project to maintain/synchronise identities. Now Sun product is option (Novell difficult to engage).
    • Peter Hill – service response reporting.
  • Operating Model Reviews
    • PROBE – major problems
    • Meta-space
    • Mobile Devices
  • Operational Separation
    • Is immanent
    • SAP teams will be hit hard
    • Has implications for our work for Wholesale
    • Shared Capability will remain as an entity with clear rules of engagement
  • Engagement scores
    • Completed
    • To be released soon after analysis
  • Very dependable team
    • no red flags
    • no head count issues
    • recruitment drive in the market generating considerable interest = 200 applications

WST Issues - Mike Owen

  • Training – will be approved on a case-by-case basis
  • Separation – will need to stay aware
  • Tech Mahindra – will make ourselves available to assist them to assist us by explaining our needs for contract resources.
  • Performance Reviews

Team Standards – Norman Close

  • Database – Norman will create a document
  • ASP.NET – James will create a document
  • CMM – Team will not attempt to obtain an objective measure of standards, but will adhere to Best Practices as/when they become known

(Break for lunch)

New Stuff – Megha Barpande

  • Use of Empty Data Template to present Details View embedded in Grid View
  • Use of 3-tier – difficult to understand initially, but now very easy to implement and maintain.
  • Grid View (design mode) will not show Enable Editing option, if the underlying Object Data Source doesn’t allow editing.
  • Themes – for consistent look and feel

New Stuff – James

  • SQL Migration Scripts
  • Master Pages
  • Forms Authentication & Authorisation
  • Site Map, Site Navigation & Bread crumbs

Tuesday, May 8, 2007

MSD2D .NET Newsletter

I really liked this one… especially the “Today in History”!

I also tried the Orcas download (all 1.1 GB of it) - I got Windows Server 2003, but no Visual Studio!

April 27, 2007

Today in History

April 27, 4977 BC - Universe is created, according to Kepler

On this day in 4977 B.C., the universe is created, according to German mathematician and astronomer Johannes Kepler, considered a founder of modern science. Kepler is best known for his theories explaining the motion of planets.

Kepler was born on December 27, 1571, in Weil der Stadt, Germany. As a university student, he studied the Polish astroner Nicolaus Copernicus' theories of planetary ordering. Copernicus (1473-1543) believed that the sun, not the earth, was the center of the solar system, a theory that contradicted the prevailing view of the era that the sun revolved around the earth.

Read more...

Current Technology News

Extending Visual Studio
If you’re interested in building extensions for Microsoft Visual Studio (VS), then you should check out the Visual Studio SDK blog. A developer is posting a diary with deep technical information as he attempts to build VS extensions.

Enterprise SOA: Cool, Sexy and So-o-o Doomed!
In his "Enterprise SOA: cool, sexy and so-o-o doomed!" blog, Robin Harris gives his prognosis for Service Oriented Architecture (SOA). You have to love his quote, “Just as Object Oriented Programming failed to make reusable code work, the idea that generic 'services' will be reusable is just as unproven. OOP code reuse failed because code contains implicit assumptions that other applications didn’t share. Are services really so different?”

No, in that way, they’re not different at all. Just like OOP produced lots of libraries that were useful to a single application, SOA will produce services that are useful to a single application. It’s impossible to think generic when you’re dealing with one specific problem. That said, OOP was, and is, used all over the place because it reduces complexity for individual developers. Services offer the same benefit.

How Software Is Built
One project that I’m involved in delves into how the production of closed-source software differs from the production of open-source software and how those differences manifest themselves in the final product. If you live in either camp, check out http://briefing.mydotnetpro.com/t?r=54&c=22802&l=5031&ctl=540DC:83501A53948693B0B5781E3B464CDAB72E6AE64CBF1B101C and weigh in with your own thoughts.

Does Everyone Really Hate Making Desktop Apps?
A series of posts on the NeoSmart Files Web site explore the question, "Does everyone really hate making desktop apps?" I don’t know—desktop development is still a big percentage of what I do. I think many people conflate the “death of the desktop” with the “death of Microsoft” and gleefully wish that desktop apps would just vanish. Still, I find myself running Microsoft Word, Microsoft Excel, Microsoft Outlook, Intuit QuickBooks, Microsoft Money, Adobe Acrobat, etc. At the end of the day, desktop apps are easier to write and harder to deploy. No matter how easy Asynchronous JavaScript and XML (Ajax) makes Web apps to write and no matter how easy ClickOnce makes d esktop applications to deploy, that fact isn’t going to change.

Yet Another Repository for Broken, Undocumented, “Hello World” Web Services
Welcome to the Microsoft Connected Services Sandbox. It’s just like XMethods, but Microsoft has added a whopping 300 percent more buzzwords. Despite the fact that in 10 minutes tinkering, I couldn’t get any of the services to actually work, I’m certain that some whiz kid l33t technosexual would be able to build a Web 2.0 Ajax fronted and SOA powered restful and zestful mashup so RAD, agile, and TDD that your startup CEO would yell WTF and launch an immediate IPO.

Hey Microsoft, now that you’ve crossed this off your list, maybe you could “invent” an octagon shape that somewhat rolls and brand it The Wheel™.

.ANI-one Know What’s Wrong with My Computer?
In case you haven’t heard, there’s a vulnerability in just about every version of Windows that allows your computer to be compromised by a Web site’s animated cursor (.ani) files. The patch is available here.

Future Technology News

A View of the .NET Road Map
In an interview, Prashant Sridharan walks through plans for the upcoming Orcas Visual Studio release. It sounds like some of the big features are Language Integrated Query (LINQ) and new tools for testers. (It’s about time.)

Kick the Tires of the March Orcas CTP Without Trashing Your Machine
Microsoft has a new Community Technology Preview (CTP) of its next development environment, and you don’t have to trash your machine to try it out. Instead, you can download a free preconfigured Virtual PC image (4.5GB) and take it for a test drive. To run the image, you need to install Microsoft Virtual PC 2007, which is also free and weighs in at a mere 30MB.

Spring Update for Xbox 360 Brings Even More PC Features
According to Brando, during the week of May 7 the Xbox 360 will be getting expanded IM, a better Live Marketplace, and a controller with a full QWERTY keyboard.

Send news, tips, and names of other billionaires who should be exiled to space to Scott Swigart.

MSD2D a division of Penton Media, Inc.
1300 E. 9th Street
Cleveland, OH 44114

Friday, May 4, 2007

.NET User Group May Meeting - Nblogr

Ivan Porto Carrero

  • Senior developer
  • Xero
  • Creator of Nblogr

What is Nblogr?

  • Blogging Engine
  • Base library for other projects
  • My experimental project
  • Extensible
  • Showcase for technologies
  • Decided to actually go through making it a proper application because of people asking me for it.

Why another blogging engine?

  • Underestimated the work involved.
  • Used to be my experimental project / Facing fears
  • None of the blogging engines do what I want them to do at the time I started the project.
  • Exploring open source
  • Contributing to the community
  • There is no community blogging platform built on .Net
  • Base for a range of other applications that are based on blogging technology (CMS, forum, wiki, …)

Which technologies?

  • Base4 (http://www.base4.net)
    • Base4 takes care of the O/R mapping
    • Base4 is a lot more than just an O/R mapper
  • Castle (http://www.castleproject.org)
    • MVC framework a la Ruby on rails
    • Contributed to the project myself (minor patches)
  • Prototype (can be replaced)
  • .NET framework (the best framework for programming)

Base4 brush-up

  • Services layer over your database
  • Good layer of abstraction of my data
  • Objects instead of database schema.
  • Seamless setup experience
  • Supports migrations

Castle introduction

  • Castle mission statement: to provide a simple set of tools to speed up the development of common enterprise and web applications while promoting good architecture.
  • MVC framework
    • Promotes separation of concerns
    • Basic castle setup would be
      • Models => Castle provides ActiveRecord through Nhibernate
      • Views => Castle provides multiple view engines (aspx/webforms, nvelocity, brail, …) (rendering engine)
      • Controller => the director of the application. Delegates input to services. And sends the output to the views.
    • Castle provides Inversion Of Control which makes your application a lot more flexible.

Nblogr architecture

  • Views & JavaScript
  • Controllers
  • Service Layer
  • Base data object
  • ASP.NET App Svc & Logging & Output compression module
  • Base4 server/client
  • Castle facilities for Base4
  • SQL Server 2005

Architecture

  • Membership provider
  • More logging
  • Output compression
  • Initialisation of mapping service
  • DataObject
    • Generalisation works well
    • Abstract service works as DAO
  • Services Layer
    • Do the actual work
    • 1 class, 1 responsibility
    • 1 method, 1 task
  • Controller
    • Common functionality in base classes
    • Receive input from request
    • Dispatch to services
    • Output results to view
  • View
    • Render results
    • A view is a representation of data

Status / Roadmap

  • Current status = Alpha
  • Roadmap
    • Multi user management
    • OpenID and CardSpace
    • Themes

HELP!!!