|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, May 20, 2013 1:04 AM
Points: 3,
Visits: 160
|
|
Very informative and easy to follow quick kick start article on using SQL Server with Maps (storing the data inside db engine) and capitalising on SSRS R2 map capabilities. I like.
Maps can be downloaded ifrom most GIS web sites, regardless of you country of origin (not limited to US only).
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Today @ 8:50 AM
Points: 12,
Visits: 223
|
|
Someone, please help me. I successfully registered the assembly SQLSpatialTools but when I run these statements to use the AffineTransform function I get this error:
Msg 243, Level 16, State 4, Line 12 Type AffineTransform is not a defined system type.
What is wrong with my system? As I mentioned above. All other steps worked without any issues.
Thanks, Stan
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Today @ 8:50 AM
Points: 12,
Visits: 223
|
|
| Never mind my previous post. I ran the Register.sql on a wrong db. I was able to run all the sql statements after I ran Register.sql.
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: 2 days ago @ 7:28 AM
Points: 309,
Visits: 684
|
|
Step 3 seems to have issues
UPDATE tl_2008_us_state SET BoundaryGeog = GEOGRAPHY::STGeomFromWKB(BoundaryGeom.MakeValid().STAsBinary(), 4326) WHERE NAME NOT IN('Massachusetts', 'New Mexico', 'Wyoming', 'Montana', 'Texas', 'North Carolina', 'Arizona', 'Tennessee', 'Utah')
Msg 4121, Level 16, State 1, Line 1 Cannot find either column "BoundaryGeom" or the user-defined function or aggregate "BoundaryGeom.MakeValid", or the name is ambiguous.
Cheers
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, May 07, 2013 8:18 PM
Points: 9,
Visits: 71
|
|
| Did you get any errors while importing the shapefile: tl_2008_us_state.shp ? From the error message, it looks like BoundaryGeom wasn't there in the table. Please double check the Geometry coumn's name.
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: 2 days ago @ 7:28 AM
Points: 309,
Visits: 684
|
|
I didn't actually. Not message, etc at all. A search of sys.objects in every database returns no results as well. On with the search..
Cheers
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: 2 days ago @ 7:28 AM
Points: 309,
Visits: 684
|
|
I noticed while looking at the table structure for tl_2008_us_state that there is a column called geom and one called boundaryGeog. Just mentioning this because it is odd those two names are a cross between what is causing the current situation.
Cheers
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, May 07, 2013 8:18 PM
Points: 9,
Visits: 71
|
|
| "geom" is the name you created during the import. I named it BoundaryGeom. BoundaryGeog is another field I added to the tl_2008_us_state table. geom is a Geometry field while BoundaryGeog is a geography field.
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: 2 days ago @ 7:28 AM
Points: 309,
Visits: 684
|
|
I changed BoundaryGeom to BoundaryGeog as seen below and now it throws the following:
UPDATE tl_2008_us_state SET BoundaryGeog = GEOGRAPHY::STGeomFromWKB(BoundaryGeog.MakeValid().STAsBinary(), 4326) WHERE NAME NOT IN('Massachusetts', 'New Mexico', 'Wyoming', 'Montana', 'Texas', 'North Carolina', 'Arizona', 'Tennessee', 'Utah')
Msg 6506, Level 16, State 10, Line 2 Could not find method 'MakeValid' for type 'Microsoft.SqlServer.Types.SqlGeography' in assembly 'Microsoft.SqlServer.Types'
Cheers
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: 2 days ago @ 7:28 AM
Points: 309,
Visits: 684
|
|
Per your explanation of column names changing the statement as seen below resolves the issue.
UPDATE tl_2008_us_state SET BoundaryGeog = GEOGRAPHY::STGeomFromWKB(Geom.MakeValid().STAsBinary(), 4326) WHERE NAME NOT IN('Massachusetts', 'New Mexico', 'Wyoming', 'Montana', 'Texas', 'North Carolina', 'Arizona', 'Tennessee', 'Utah')
Cheers
|
|
|
|