## Create polygon around dot

Create polygon around dot
# 1
10-21-2013
Create polygon around dot

Dear Masters,

Kindly need your help to solve my issue..
My goal is create a polygon around "dot" (x,y coordinate)

lets say we have some dot as below (these coordinates have meter as unit)

And I want to create polygong around dot which has radius 150 meters.

my logical is
for every dot, if dot has x_ori and y_ori, i have to calculate every 2 degree (0-360 degree) for x_calculated and y_calculated.

polygon1 : x_ori + x_calculated1 , y_ori + y_calculated1
polygon2 : x_ori + x_calculated2 , y_ori + y_calculated2
to
polygon181 : x_ori + x_calculated181 , y_ori + y_calculated181

and
whereas

Ipatah
 ipatah View Public Profile for ipatah Find all posts by ipatah
# 2
10-21-2013
I'd try it in awk:

This User Gave Thanks to Corona688 For This Post:
 Corona688 View Public Profile for Corona688 Visit Corona688's homepage! Find all posts by Corona688
# 3
10-21-2013
May I propose to add BEGIN {Pi=4*atan2(1,1)} and then use Pi for optimal precision?
This User Gave Thanks to RudiC For This Post:
 RudiC View Public Profile for RudiC Find all posts by RudiC
# 4
10-21-2013
 Corona688 View Public Profile for Corona688 Visit Corona688's homepage! Find all posts by Corona688
# 5
10-21-2013
Default output fmt is "%.6g"

---------- Post updated at 23:00 ---------- Previous update was at 22:48 ----------

Also:
This User Gave Thanks to RudiC For This Post:
 RudiC View Public Profile for RudiC Find all posts by RudiC
# 6
10-21-2013
The accuracy difference between the two Pi values equates to about 4 microns over the 150 meter radius.

Since the OP's datafile only goes to mm precision it is probably all moot and 22/7 will do quite nicely,

Last edited by Chubler_XL; 10-21-2013 at 09:16 PM..
These 2 Users Gave Thanks to Chubler_XL For This Post:
 Chubler_XL View Public Profile for Chubler_XL Find all posts by Chubler_XL
# 7
10-23-2013

---------- Post updated at 10:05 PM ---------- Previous update was at 08:01 AM ----------

Hi Masters,

I have tried the script and thank you that is works, Here I need more improvement. I edit a script from Corona688 as below

but I need to add numbering at the end of raw (increasing for every input coordinate) as output example below

for 2 input coordinate

And I should get output as below

ipatah

Last edited by ipatah; 10-23-2013 at 12:18 AM..
 ipatah View Public Profile for ipatah Find all posts by ipatah

## Mv or cp with a . (dot)?

How can I rename a file with a . prefix? I actually need to copy the file but the . seems to be very tough to do. mv ./bla ../fa/la/.bla - doesn't work. I've tried all sorts of bracketing and that doesn't work. Maybe the only way to do it would be to name the file _.bla then rename it...

## Remove prefixes before dot

Shell : Bash shell I have a text file with entries like below srv.sr_num sr_number, atvx.ATTRIB_37 Product_Name, ktx.X_ATTRIB_52 Product_Type, mkx.created sr_created_date, nbv.sr_cat_type_cd sr_type, bkrx.sr_area sr_category, .. frx.order_id, des.stats_name , fpxg.current_id_name, ...... ....

## How to Removing a dot from a file name?

I need a script that will allow me to rename all of my files in subdir /FilesIn as follows: From kumc_835_111200.RMT.dat to kumc_835_111200RMT.dat kumc_835_111200.KMR.dat to kumc_835_111200KMR.dat .................etc How do I do that whithout doing a sed ...

## How to get data only inside polygon created by points which is part of whole data from file?

hiii, Help me out..i have a huge set of data stored in a file.This file has has 2 columns which is latitude & longitude of a region. Now i have a program which asks for the number of points & based on this number it asks the user to enter that latitude & longitude values which are in the same...

## variable name with dot(.)

Hi, Is it possible to declare variable with name having dot(.) in it ? something like gs.test='HELLO' Thanks in advance :)

## Replacing dot for comma

I wanted to change 34.66 to 34,66. I tried the command: sed 's/./,/' \$NUM Where \$NUM is a variable with 34.66 value. The output is ,4.66

## Regarding Dot Matrix Printing

Hi all, What I want is that can we manage printing a text file on a Dot Matrix printer installed on a Linux machine and the printer should not take the normal A4 format, but should print only to the extent the text file has text in it. What happen usually is that when we give print comand to any...

## splitting on dot in perl

I am trying to split input that looks like ,2005-09-12 01:45:00.000000,2005-09-12 01:48:18.000000, I want to split on the dot . What I am using is (\$ev_time,\$rol)=split(/\./),\$inputfile; This does not recognize the dot as what I want to split on.

## dot files

Hi, everyone. I'm now using rsync command, and please tell me what is the wildcard for below looks like. I want to chose dotfiles, such as .ipod .apple but i don't want to chose . and .. ------------------ .* doesn't work, of course. Thanks, Euler04