Solved

Line Length - Geometry Field?

Posted on 2013-02-06
6
553 Views
Last Modified: 2015-01-05
Within my GIS Package there is the local Length or Area of a measurment. Each Line or Area is stored in SQL Server. This is a function only in my GIS Package its currently not a column in the SQL table. Its calculated live on the fly only in the GIS package

Is there a way within SQL Server to determine the Length of a Line Feature on the fly?

Then i need to build a query like this?
First Step
I need a query that will the determine the length of the line is "X" meters.
Second Step
The total address range(Smallest # of the 4 columns) and (Largest # of the 4 columns) in this case the address range is 1-400. That will come from  these 4 existing columns L_F_ADD(1), L_T_ADD , R_F_ADD, R_T_ADD(400).
Third Step  
Calculate the length of the line(Step 1) (divided by 15.25m) then multiplied by 2, . This will give me the total amount of address numbers there should be.
Forth Step
Are the Total Address #'s (Step 3) within 10% of the Actual address numbers on the Road(Step 2). If not flag a column (RangeError).
0
Comment
Question by:PtboGiser
[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
  • 3
  • 2
6 Comments
 

Author Comment

by:PtboGiser
ID: 38860377
I have also posted this on the GIS Software package site. I would prefer doing it in SQL server as i know this software won't change. We may be changing GIS Packages shortly so that query will be retired at that point,
Thanks
0
 
LVL 32

Expert Comment

by:awking00
ID: 38860542
Not sure I completely understand what you're trying to accomplish. Can you post some sample data and your expected output?
0
 

Author Comment

by:PtboGiser
ID: 38861245
Is there a length field somewhere is SQL Server? So i can find out the Length of a Line to query its results?
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 48

Assisted Solution

by:PortletPaul
PortletPaul earned 500 total points
ID: 38861759
the [unstated] GIS package seems to store lines and areas, but not length of line, which is calculated 'on the fly'.

You want that length of line, and then perform some additional arithmetic with that value.

Does the GIS package have an api?
(i.e. can it return the calculated value to you? perhaps it has a web service?)
Or can you scrape that value from (say) a url?

From what I understand of the subsequent arithmetic - that won't be a problem. Getting the initial length value  is the hard bit.
0
 

Author Comment

by:PtboGiser
ID: 38863843
I can get the Length from the GIS Software (Manifold GIS) and populate it in the table but then it becomes static data i need to run a query to update. I was hoping to keep the data "Live"
I'll work with it that way.
0
 
LVL 48

Accepted Solution

by:
PortletPaul earned 500 total points
ID: 38865464
Ok, so is there anything else required on this question?
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

752 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