Solved

Convert Latitude and Longitude to Polygon and create view

Posted on 2011-02-16
1
928 Views
Last Modified: 2012-05-11
Dear Experts

I have a table consisting of the following:

pAddress    (char50)        [Property Address]
pLat             (varchar20)  [Latitude]
pLong          (varchar20)  [Longitude]


I would like to create a view from this table that includes another column (polygon).  The polygon value will be calculated from the pLat and pLong values.

Is this possible?

Thanks




0
Comment
Question by:grantballantyne
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 40

Accepted Solution

by:
lcohan earned 500 total points
ID: 34907460
It should be something like:

create view get_polygon_values as
select pAddress as    [Property Address],
      pLat  as  [Latitude],
      pLong as  [Longitude],
      pLat + ';' + pLong as [Polygon]
from tablename
GO

select * from get_polygon_values


You should update the view whith whatever your mean for [Polygon] is. I just gave an example by concatenating the two fields.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question