Solved

Convert Latitude and Longitude to Polygon and create view

Posted on 2011-02-16
1
918 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
1 Comment
 
LVL 39

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now