• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 938
  • 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

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

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