Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 934
  • Last Modified:

Convert Latitude and Longitude to Polygon and create view

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
grantballantyne
Asked:
grantballantyne
1 Solution
 
lcohanDatabase AnalystCommented:
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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now