How do you create a buffer of a geometry in SQL Server 2012?

Hello,
I am new to SQL Server 2012 and spatial data. I built a geometry object of coordinates from a polygon that I stored in a database.  The code is below:
DECLARE @digb GEOMETRY;
SET @digb = GEOMETRY::STGeomFromText('POLYGON ((-79.927138 40.362654, -79.91883 40.364224, -79.915966 40.361067, -79.917897 40.359266, -79.927398 40.360142, -79.927138 40.362654))', 4269);
I am using SRID 4269 (Latitude/Longitude NAD83).  I have no issues getting this geometry to load properly when the query is executed. (shown below)
My problem is that I am unable to create a valid buffer of 150 feet on this geometry.  I have tried using these 3 statements below (I assumed BufferWithCurves() would be the one that would work); however, ALL of them returned to an invalid buffer of
the polygon (shown below):
-     DECLARE @digbb GEOMETRY = @digb.STBuffer(2);
-     DECLARE @digbb GEOMETRY = @digb.BufferWithCurves(2)
-     DECLARE @digbb GEOMETRY = @digb.BufferWithTolerance(@BufferSize,250.0,1);
Does anyone have any idea of how creating this buffer of a geometry object (polygon mentioned above) in SQL Server 2012? 
Thanks in advance for any help.
Nick

Hi Nick,
BTW, please do ask questions on the forum, that's what it's for. I only meant "if my explanation in that specific answer was unclear, let me know and I'll clarify". Feel free to start a new thread for each topic because that way, it's
might be easier for folks to search on.
Specific answers:
I haven't worked directly with the MapInfo loader but if you're working with SQL Server, I assume what they may be doing is looking for "geodesic SRIDs" that SQL Server supports (the ones listed in sys.spatial_reference_systems) and loading those
as geography, else geometry. That may be a good thing to do.
If you want to decide yourself, here's some (short) background.
Only SQL Server (I think PostGIS might have added it) has separate geography and geometry types. Everyone else always uses "geometry" and gives you (maybe) the ability to convert between SRIDs in the database. SQL Server doesn't have
this built-in; you'd need to use a library like PROJ4.
You can use geometry type to refer to geodesic SRIDs, but it doesn't have a way to "take the area using spatial instances in decimal degrees and come up with meters". So, if you only use it to display on a map, it will display correctly.
Or close enough. Same with intersects, intersection and the like. But anything like area, distance, or, in your case buffer using a specific number of meters, you need to use geography.  You could have gotten somewhat similar-looking
results with geometry by making your input to STBuffer a sufficiently small fraction, but it would be a guess on your part, not a "150 feet" buffer.
You can't CAST/CONVERT between geometry and geography because they didn't want people to assume that these would do SRID conversion. However, there is a codeplex library "SQL Server Spatial Tools" (http://sqlspatialtools.codeplex.com/) that
has two methods: VacuousGeometryToGeography and vice-versa, that does the equivalent (but optimized) of taking one type, spitting it out in well-known text format, then using it to initialize the other type. Or you can do this in your own code.
In general, geography is for anything geodesic; geometry is for planar or projected coordinate systems (e.g state plane coordinate systems in US, that don't use Long/Lat). But geography is slightly slower in calculations (like intersects) because it's more
complex than simple Euclidian geometry. And folks in other platforms are used to using "geometry" and having the platform do the (sometimes fairly expensive) conversions on-the-fly. Or maybe you don't care about the area, distance, etc.
Even in the geography type, WKT specifies (Long Lat) not (Lat Long). This is because the OGC standard doesn't distinguish and calls things (X Y), and if you think about it, (X Y) is (Long Lat) not (Lat Long). The SQL Server geography-specific method MakePoint
has latitude first as a parameter. OGC or SQL/MM standard methods and property names start with "ST" in SQL Server (e.g. STIntersects); SQL Server-specific methods and properties do not (e.g. MakePoint, ReorientObject).
Finally, attempting to do spatial calculations with unlike SRIDs (e.g. intersects between SRID 4269 and 4326 instance) returns NULL.  
One more post coming on this thread with some info/links.
Cheers, Bob

Similar Messages

  • Failed to create LOGIN from a domain account on SQL Server 2012

    Hello,
    My environment is like,
    A Domian Controller (with the domain name: CONTOSO) hosted by a Windows Server 2008 R2.   --- Server 1
    A SQL Server 2012 x64 runs on another Windows Server 2008 R2 (this Server has been added into the CONTOSO domain).  --- Server 2
    I am trying to create a SQL login on Server 2 with the statement shown below:
    CREATE LOGIN "CONTOSO\domain_group_b" FROM WINDOWS;
    while, an error occurred,
    Msg 15401, Level 16, State 1, Line 1
    Windows NT user or group 'CONTOSO\domain_group_b' not found. Check the name again.
    I've made sure that the domain group account "domain_group_b" has been created on Server 1.
    Is anything else needed to be done?

    Pretty pretty sorry for my bad explanation in English.
    Yes, the Server 2 (the actual name of this server is "SQL-A", the Server 1's name is "DC") has been a member of CONTOSO. 
    I typo the domain name CONTOSO as CONTSO, but I keep using CONTSO everywhere.
    These two servers are hosted by Hyper-V.
    I could login on server2 by the domain user "domain_user_b".
    It seems that neither the domain group, "domain_group_b" nor the domain user, "domain_user_b" cannot be associated when creating a SQL login.
    SQL-A captures:

  • Syntax error when creating a user-defined table type in SQL Server 2012

    Why am I getting a syntax error when creating a user-defined table type in SQL Server 2014?
    CREATE TYPE ReportsTableType AS TABLE 
    ( reportId INT
    , questionId INT
    , questionOrder INT );
    Results:
    Msg 156, Level 15, State 1, Line 1
    Incorrect syntax near the keyword 'AS'.

    Hope these posts could help, 
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/37a45a9a-ed8c-4655-be93-f6e6d5ef44be/getting-incorrect-syntax-while-creating-a-table-type-in-sql-server-2008-r2?forum=transactsql
    Regards, Dineshkumar,
    Please Mark as Answer if my post answers your question and
    Vote as Helpful if it helps you

  • How do you create a link to a pdf in Muse? Thought it was going to show that with Katie's menu and can"t find in any of the tutorials.

    How do you create a link to a pdf in Muse? Thought it was going to show that with Katie's menu and can't find in any of the tutorials.

    The steps would be :
    - Add files from file menu > select pdf > add to site
    - Select the content (rectangle,text etc) and click on hyperlink dropdown > it should show you the added files list
    - Select the file you want to link
    Thanks,
    Sanjit

  • How do you create a new apple id on the iphone

    how do you create a new apple id on the iphone 4?

    Why do you want to do that?

  • How would you create a read/display only applicaiton montior role for SRM

    Hello,
    I was hoping to get some insight on how to create a display/read only SRM Application monitor role.  This role would be used by our Service Desk to perform basic trouble shooting before escalating.  Currently in our system it is tied into a tab named SAP Administration and has the capability of doing more than read.  How do you create a read version of this to only display the application monitoring in read mode? We currently have an SRP role that has the followiing auths below.  Would a EPP portal role need to be created and if so how>  Thank you for any assistance.
       Manually   BBP Component                                                BBP
              Manually   SRM: General Access Authorizations in EBP                    BBP_FUNCT
               Manually   SRM: General Access Authorizations in EBP                    T-SD59003000
                 Function in SRM (for Authoriza MON_ALERTS                                                                  BBP_FUNCT
    - Todd

    Hello,
    I was hoping to get some insight on how to create a display/read only SRM Application monitor role.  This role would be used by our Service Desk to perform basic trouble shooting before escalating.  Currently in our system it is tied into a tab named SAP Administration and has the capability of doing more than read.  How do you create a read version of this to only display the application monitoring in read mode? We currently have an SRP role that has the followiing auths below.  Would a EPP portal role need to be created and if so how>  Thank you for any assistance.
       Manually   BBP Component                                                BBP
              Manually   SRM: General Access Authorizations in EBP                    BBP_FUNCT
               Manually   SRM: General Access Authorizations in EBP                    T-SD59003000
                 Function in SRM (for Authoriza MON_ALERTS                                                                  BBP_FUNCT
    - Todd

  • How do you connect your photoshop elements on your computer to your account online? and how do you create a customized url? how does the gallery work and how do you access it? i have trouble signing in on my program from my computer to connect to the onli

    how do you connect your photoshop elements on your computer to your account online? and how do you create a customized url? how does the gallery work and how do you access it? i have trouble signing in on my program from my computer to connect to the online photoshop, and I really want to create my own customized url and post photos to my gallery and share them with the world, family, and friends, but i need help because i can't figure how to do any of this, would really appreciate feedback and assistance, thanks, - claire conlon

    To add to sig's reply, "calibrating" does not calibrate Lithiu-Ion batteries, it calibrates the charge reporting circuitry.  If you look at the effect of deep discharging Lithium-Ion batteries in the data from the independent test group, Battery University, you will see that doing so shortens the life of the battery significantly. It looks like an optimum balance between use and life is at a discharge level of 50%.

  • HT4191 iPhone Local Storage "My iPhone" - How do you create this folder for use by the Notes app on a iPhone or iPad?  If I want to keep some notes only on my device and not in a cloud environment associated with an e-mail account.

    iPhone Local Storage "My iPhone" - How do you create this folder for use by the Notes app on a iPhone or iPad?  If I want to keep some notes only on my device and not in a cloud environment associated with an e-mail account.  I've seen reference to the  "My iPhone" local storage put no mention on how you create this folder or access this folder within the Notes app.  I realize storing information in a local storage like this provides no syncing between other iDevices but that is exactly what I'm looking for.  I'm running iOS7.0.4 on a iPhone 5S, and a iPad Air.  Any help would be greatly appreciated.

    If you go to Settings > Notes > Default Account you will see "On My iPhone" as the default account and the only choice if you have not enabled syncing Notes in Settings >iCloud or Settings > Mail, Contacts, Calendars. If you have enabled syncing you can still select "On My iPhone" as the default account. When you are in the Notes app you won't see any accounts listed if you have not enabled syncing because they are all in the On My iPhone account and that is the only place possible. It is not a folder that you create.

  • How do you create a new account for a family member?

    My daughter and I both have Ipods, and want to setup SEPARATE accounts. Itunes 7 worked great, but now when we 'upgraded' to 8, it MERGED all our files. So I thought I had a separate account, but it turns out when I load a new song, it goes into HER Itunes files. She deleted all my info, and I REALLY want a separate account (that sticks).
    My songs are still in my directory under "Mikes Itunes", but when I reloaded them into what I thought was a fresh entry, it turns out it went into my daughter's Itunes file too! What is up with Itunes 8? and how can you create a TRUE separate account so I have control over MY songs!?

    First, let's make it easier to swap between accounts. In the Accounts pane of System Preferences click on the Login Options (after unlocking the pane). Enable fast user switching. This will put a new menu in the top right of the screen. You can then swap to the other account without having to log out of the current one.
    Log into the original account. Select the folder you want access from the other account and choose Get Info from the file menu. There is a section called Sharing & Permissions. You will need to click on the padlock to make changes. Click on the + to add permissions for the other user account by selecting the user account from list that appears. Set the permission for that account to read only. Once you have it listed then choose the "Apply to enclosed items" from the gear menu below the list. This should give you access from the other account to that folder and any folders contained in it.
    For iTunes you will want to do this to the Music folder, giving you access to the files below. From within iTunes you can select Add to Library from the file menu, and then select the music from the other account to that account's iTunes library. Once you have set up the new library whoever's library is the original can clean up the library to remove any music they don't want (now that it's in the new account).

  • How do you create an AcrobatXI zip file in windows 8.1?

    How do you create an AcrobatXI zip file in windows 8.1? from acrobat.com docs?  Sorry Not sure what community to ask this in this community?  The email provider I was using didn''t seem to want to accept it through Adobe Send the first time and since Adobe Send ends January 6, I am assuming a zip file is preferable..  I thought I had seen an Adobe Zip file somewhere but haven't been able to locate it. Any help appreciated.
    Thank you.
    Sherrie

    Hi Sherrie L,
    Adobe Send is Adobe's current solution for sending large files. (It's Adobe SendNow that's retiring soon.) Can you tell us what trouble you were running into using Adobe Send?
    There isn't a special version of Zip files for Acrobat, but you could reduce the PDF file size if you have Acrobat. Or, in Windows, you can create a Zip file by choosing File > Send to > Compressed (Zipped) Folder.
    Best,
    Sara

  • How can you create a spry menu bar with no background colour?

    How can you create the first level of a spry menu bar to have no colour? I have a coloured background right now and the colour matches when you load the site in Internet explorer but does not match in Firefox. Any suggestions are welcomed on how to fix this.
    Thanks!
    HK

    Here is the site:
    http://partnersnaturally.ca/
    I am learning with code, (obviously) so any feedback would be nice. I use dreamweaver CS4, but when I originally designed the site it was in a much older version of dreamweaver. I wonder if that could also be a cause. (besides human error)
    Thanks again,
    HK

  • How can you create a writable PDF document from a PPT presentation ?

    How can you create a writable PDF document from a PPT presentation ? Upper part with the image , lower part with a free space in order to take notes for students during presentation or course.
    Thanks.
    B

    You can make a PDF file out of you notes and handouts but using the Adobe PDF printer.
    Open your PowerPoint Document then go to “File” “Print”
    Select ‘Adobe PDF” Printer
    Under slides, select which way you want to print. Note it will not print to a printer but to a PDF file.
    After then go into printer Properties and Setup PDF properties, do the following: (see second image below)
    Default: PDF/A 1-b
    Adobe Security: none (change as needed)
    Adobe Output folder: Prompt for Adobe file name
    Adobe Page size: Letter (change as needed)
    Check the following check boxes
    View Adobe PDf Results,
    Add Document Information,
    Rely on system fonts only,
    Delete Log files for successful jobs.
    Select OK
    A pop will ask you where you want to save the document. The file extension should be PDF. After giving the file name select okay and the file should popup as a PDF. Down side is if you want to speaker notes included then you will have to do another file, like wise with just screen shots then combine into one PDF document.
    I used Acrobat IX Pro. So to do this you need Acrobat IX or X Pro.
    Hope this will help.
    Tiger26

  • How can you create a playlist with music and music video and play those from same playlist through Apple TV?

    How can you create a playlist on Ipod touch with music and music video,  and play those from same playlist through Apple TV?  I can download, create a playlist with both music and music video, stream that through the Apple TV with no problem.  The sound and the information show up on the TV, but when it gets to a music video, it only shows the information and "artwork".
    I also have a video playlist - videos play fine through the Apple TV, but will not shuffle through all videos - continues to repeat the same one.  I have most definitely selected shuffle in both locations - from the playlist and on the ipod video screen while video is playing.

    I finally got it... had to sync the photos with the music in iMovie, arrange the voiceover in GarageBand then export to iTunes, and then I was able to put it all together in iMovie and burn in iDVD... had a few glitches along the way but finally finished : )
    Message was edited by: jpewald

  • How do you create a mixed media disc? I would like to include a slideshow/movie as well as include a .pdf of a photo book on the same disc?

    How do you create a mixed media disc? I would like to include a slideshow/movie as well as include a .pdf of a photo book on the same disc. I would like the movie to play on any DVD player.

    Do you want the pdf available to view or just for copying from the disk to a computer for viewing.
    To view a PDF you can do a Print ➙ PDF ➙ Save PDF to iPhoto which will create a jpg of each page of the pdf and save it to iPhoto.  From there you can send the PDF jpegs to iDVD to make a slideshow of the pages.  It's the same principle as used in this tutorial: 06 - Creating an iDVD Slideshow From an iPhoto Book.
    If you don't have the Safe to iPhoto workflow in your HD/Library/PDF Services folder you can download it from  Toad's Cellar.
    Happy Holidays

  • How do you create an installer/bundle for PPro with extension, a plugin (export-controller) and some

    Hi
    As my topic says
    How do you create an installer/bundle for PPro with extension, a plugin (export-controller) and some custom presets?
    Assume you have Flash Builder 4.5, CS Extension builder 2.0, Xcode 4.5.1 running under MacOS 10.8.

    I understand why you need updated running headers in your book. To a sighted reader these serve as a guide to where you are and help you find things quickly.  In addition, if you are exporting your data to XML or HTML from the tagged PDF it would also be important to have these in the proper location. 
    But for accessibility purposes, it doesn't have to be there because the screen reader reads everything in linear order, line by line.  No one is looking at the page.  A user listening to the screen reader read the page is going to hear this heading, just before the actual word itself. So they will hear the first word on the page twice.  It's not the end of the world if it's there, but such headings are not necessary for accessibility unless they are not repetitive and contain information that is not otherwise available.
    So I would say, fine if you need them or want them there, it's just one word. 
    I think you should try exporting your book to PDF (or even just a chapter of the book) and look at the tags panel in Acrobat to see if you are getting the result you want.  I can't tell you exactly what you should do to get those results, you are using a plug-in I don't have. 
    I can tell you I didn't have to add the headers to any article at all, they just automatically export if the other articles in the file are added and you don't select the header style option "not for export as XML."
    You may not experience the same results with your plug-in, but I think it will probably work the same way. 
    Give it a try and best of luck.

Maybe you are looking for