Get the length and width of a rectangle
I use sdo_sam.tiiled_bins in rectangles of bursting into different sections. I need to divide the rectangle along the x axis depending on if there is longer or wider. I checked the documentation and I couldn't find a way to get the length and width of a rectangle encompassing minimum. Is there any built-in feature to get the length and width of a rectangle or do I have to create my own? Database is 11 GR 2.Thank you
Rob
Rob,
You can use SDO_GEOM. SDO_MIN_MBR_ORDINATE and SDO_GEOM. SDO_MAX_MBR_ORDINATE to calculate the length and width of a mbr.
References:
[SDO_GEOM. SDO_MIN_MBR_ORDINATE | http://docs.Oracle.com/CD/E11882_01/AppDev.112/e11830/sdo_objgeom.htm#i866250]
[SDO_GEOM. SDO_MAX_MBR_ORDINATE | http://docs.Oracle.com/CD/E11882_01/AppDev.112/e11830/sdo_objgeom.htm#i866249]
Kind regards
Noel
Tags: Database
Similar Questions
-
Get the height and width of an image
I have therefore some images in my program that I'm loading. These images are much longer than the size of the screen. So I put in a ScrollView. My question is how can I get the height and width of an image. The image.width and image.height doesn't return the correct values.
//add the image private function addImage():Container { var sp1:Container = new Container(); sp1.sizeUnit = SizeUnit.PIXELS; sp1.debugColor = 0xFFFFFF; sp1.margins = Vector.
([1,0,0,0]); sp1.align =ContainerAlign.NEAR; //sp1.setSize(650, 800); var myPattern:RegExp = / /g; var fileName:String = "./com/swiz/img1.png"; var icon:Image = new Image(); icon.setImage(File.applicationDirectory.resolvePath(fileName).url); //icon.setPosition(0,0); //icon.setSize(320,800); sp1.addChild(icon); sp1.setSize(650, icon.height); return sp1; } and my code scrollview is
//add to the scrollView var scroller:ScrollPane = new ScrollPane(); scroller.width = 650; scroller.height = 505; scroller.y = 0; scroller.addScrollContent(addImage()); addChild(scroller);
Thanks in advance!
Hey shethab,
in order to retrieve the height and width of your image, you must use use the an event listener on your image and check for the Event.COMPLETE event. What is happening because the image you upload is not built, it takes time to load into your application using the setImage() method. and when you check the width height after the setImage method, the image was not loaded and has no height and width to this second. If you use the event listener, you can retrieve the height and width as it was finally loaded.
Try the following code:
import flash.events.Event; //add the image private function addImage():Container { var sp1:Container = new Container(); sp1.sizeUnit = SizeUnit.PIXELS; sp1.debugColor = 0xFFFFFF; sp1.margins = Vector.
([1,0,0,0]); sp1.align =ContainerAlign.NEAR; //sp1.setSize(650, 800); var myPattern:RegExp = / /g; var fileName:String = "./com/swiz/img1.png"; var icon:Image = new Image(); icon.setImage(File.applicationDirectory.resolvePath(fileName).url); icon.addEventListener(Event.COMPLETE, onImageLoaded); //icon.setPosition(0,0); //icon.setSize(320,800); sp1.addChild(icon); sp1.setSize(650, icon.height); return sp1; } private function onImageLoaded(e:Event):void { trace("image height: " + e.target.height + " image width: " + e.target.width); } hope that somethings brightened. Good luck!
-
Get the height and width of the jpg or png of bitmap without loading the file
Is there a way to get the height and width of a bitmap, such as jpg or png file, without loading the complete file of the image first.
Thank you!
Hi JamesColeman,
While you can't get the width and height of the jpg or png without access to the file, you can get this information without access to the entire file. A PNG for example (in raw hex) indicates the width and height of the image it contains. The first 21 bytes contain the file-specific information such as name, etc, but just after the IHDR header 4 bytes indicate the width and the other 4 bytes indicate height. If enough for you to read the first 29 bytes of the PNG to be able to get its dimensions, which, while it still requires access to the file is much easier.
I have the code to read this information here and if you want to learn more about the specifications you can find information on this site.
Best wishes
André
-
get the height and width of the screen in QML?
How to get the height and width of the screen in QML?
Please search the forums before you make a new post. This post is still on the first page... http://supportforums.BlackBerry.com/T5/Cascades-development/correct-way-to-get-display-width-height-...
-
How to get the length and sub lymph nodes.
Hello
find the script below.
< List1 >
< list >
< List1 >
< List1 >
< List1 >
< / list >
< list >
< List2 >
< List2 >
< List2 >
< / list >
--
--
-
-
-
-< / list1 >
Here the tag list will be growing based on the I / p. Now what I want is to know how to get the length of the tag < list >.
To implement the above I used the code below
var number = xfa.record.List1.List [0].nodes.length; (Does not work)
But if var account = xfa.record.List1.nodes.length; (work)
and also I want to delete a tag inside the < List > tag. How?
Very Urgent.
Thanks in advance.
Yes, you need to use the name instead of the value to get the tag name...
xfa.datsets.data.Root.nodes.item (0) .name
Thank you
Srini
-
Get the height and width of the object of a threshold
Hey guys,.
I am currently working on the extraction of the human sillouhette. Currently, I am trying to retrieve the height and the width of a human sillhouhette for further analysis. Are there any screws for this? Or if any of you can recommend a method? I really need help. The 2 images below should illustrate what I'm talking about. Note that I have several images (various) to analyze a video.... Help is really appreciated. Thank you.
Concerning
This task could be run with IMAQ particle analysis Report.vi.
Please note that this VI is installed with the Vision Development Module.
-
Get the position and width of each textFrame line
Hello!
I have a file of a designer with a layout of text that has a block of copy centered with lots of kerning adjustments and line breaks. I want to loop through the lines and find the position of Center, left and top (in pixels) of each line of the textFrame. Is there a way to do this in JS?
Thank you!
-kc
Hmm, try this script and see if it works.
#target illustrator function test(){ function newCMYKColor(arr){ var c = new CMYKColor(); c.cyan = arr[0]; c.magenta = arr[1]; c.yellow = arr[2]; c.black = arr[3]; return c; } function marker(xy, clr){ var doc = app.activeDocument; var p = doc.pathItems.ellipse(xy[1] + 2, xy[0] - 2, 4, 4); p.stroked = false; p.filled = true; p.fillColor = clr || newCMYKColor([0,100,100,0]); return p; } function gridize(pageItems, buffer){ var tempArr; tempArr = pageItems.slice(0).sort(function(a,b){return b.top - a.top;}); var buffer = buffer || 10; /* buffer is the max variance expected between separate rows */ var vBnds = []; for(var i=0; i
-1; j--){ if(temp[j][1] + buffer >= currentRowYMarker[1] && temp[j][1] - buffer <= currentRowYMarker[1]){ currentRowY.push(temp[j]); temp.splice(j,1); } } if(currentRowY.length > 0){ sortedVBnds.push(currentRowY.sort(function(a,b){return a[0] - b[0];})); } } sortedVBnds.sort(function(a,b){return b[0][1] - a[0][1];}); return sortedVBnds; } function getRowTop(row){ var num = 0; for (var i = 0; i < row.length; i++) { var vb = row[i]; var top = vb[1]; if(top > num){ num = top; } }; return num; } function getRowBottom(row){ var num = row[0][3]; for (var i = 0; i < row.length; i++) { var vb = row[i]; var btm = vb[3]; if(btm < num){ num = btm; } }; return num; } function getRowRight(row){ var num = row[0][2]; for (var i = 0; i < row.length; i++) { var vb = row[i]; var right = vb[2]; if(right > num){ num = right; } }; return num; } function getRowBounds(row){ var arr = []; var left = row[0][0]; var right = getRowRight(row); var top = getRowTop(row); var bottom = getRowBottom(row); return [left, top, right, bottom]; } function getRowCenter(rowBounds){ var r = rowBounds; return [r[0] + ((r[2] - r[0]) / 2) , r[3] - ((r[3] - r[1]) / 2)]; } //================================================== MAIN =================================================// if(app.documents.length > 0){ var doc = app.activeDocument; doc.rulerOrigin = [0,0]; if(doc.selection.length > 0 && doc.selection[0].typename == "TextFrame"){ var s = doc.selection[0]; var dupeText = s.duplicate(s, ElementPlacement.PLACEAFTER); var dupeTextOutlines = dupeText.createOutline(); dupeText = null; var myArray = []; for (var i = 0; i < dupeTextOutlines.compoundPathItems.length; i++) { var thisComp = dupeTextOutlines.compoundPathItems[i]; myArray.push(thisComp); }; var allLines = gridize(myArray); for(var i=0; i -
How to get the height and width of the exact text in TextLayout framework
Hello fellow developers,.
I'm starting to work with TLF when there are three different CFC now, I work with unique CFCS with flex 4 and a lot of things are changed as
I use calculateHeight (), calculateWidth () now these methods are not available.
If someone knows the replacement of these methods then do let me know.
Thank you
If the text exceeds the container, what can happen in a container to scroll where you have to scroll to see some of the text, then returns getContentBounds values are estimated values. It is because we do not want to force the text to recompose all the way at the end of a very long TextFlow in order to return a value. However, if you want to get the exact amount and is not afraid to take the time to redial, call textFlow.flowComposer.composeToPosition (), before calling getContentBounds. This forces all text redial at the end, and then getContentBounds displays the calculated value entirely instead of her estimate.
-
How to get the height and width of the screen of the blackberry device?
Can someone tellme how to get details of the screen of the blackberry device?
Display.getWidth () and Display.getHeight (). If this isn't what you want, let us know.
-
How to get and set the length and the width of the content of the layer?
How to get and set the length and the width of the content of the layer
All layers are packed not equal. a layer as adjustment have no limits. Layer to smart object can have two different sizes. The size of the object and the size of the object may be transformed. All smart object layers have an associated transform. To transform a smart object layers you need to work with the size of the object the generated pixels fot the layer. Text layer can be resized with a transform or by changing the font size. Pixelated layers are resize via a transformation. The script method is resize. When you resize the number of pixelsits made by interpolation. You can specify what method to use or set Photoshop interpolation preferably by default.
There is also a bug in Photoshop scripts if you pause the story said make a selection and use resize. Photoshop will properly support up to a State before where you suspended history. This bug seems to be in all versions of Photoshop.
If you look ate the script in my bug report, you should get a good idea of how to resize a layer.
Photoshop: Bug Script resize the rear paper folded to a history State
-
Users of Adobe Premiere:
Somehow I can get the length of a segment of the timeline using only entry points and somehow like in FCP?
I want to get the exact length of timecode for some segments only, not the entire timeline. Can not know how to do this.
If you set the entry points and in the program monitor, is indicated to the right:
-
Is it possible to get the length to swipe distance?
Hello
Is it possible to get the length to swipe distance?
I use Actionscript3 in AnimateCC.
And I use the event: TransformGestureEven to drag the event.
(x distance only)
Oh... I don't care?
with touchpoint, you can, but I'm not using a gestureevent for this. If you must use sign language events in other parts of your application, you can try mousedown and mouseup.
-
get the length of each string in a column
Hi all
Is there a way to get the length of each string in a column:
for example:
If the table contains lines like below:
Select 'test test1 test31' col1 of double
Union of all the
Select 'sectest1 sectest234' double col1
The output should be as below:
col1
------------
4 5 6
8 10
That is to say get the count of each separated from the chain of space in a column. Is this possible using regexpr_substr?
Thanks in advance.
Roy.
Try the below
SELECT LISTAGG(val1,' ') IN ONE GROUP)
New_val ORDER BY lvl)
Of
(SELECT LENGTH (REGEXP_SUBSTR (col1,'[^] +', 1, LEVEL)) val1,)
RN,
LEVEL lvl
Of
(SELECT col1,
ROWNUM rn
Of
(SELECT 'test test1 test31' col1 OF double)
UNION ALL
SELECT 'sectest1 sectest234' double col1
)
)
CONNECT BY LEVEL<= regexp_count(col1,'="">=>
AND PRIOR rn = rn
AND PRIOR DBMS_RANDOM. VALUE IS NOT NULL
)
GROUP BY rn;
OUTPUT:-
=======
col1
----
4 5 6
8 10
Thank you
Ann
-
get the length of a track/curve?
Hello.
As part of my business I'm looking for a way to get the length of a plotter-line in mm.
I saw that there are plug-ins via forums but positions date of 10 years.
So I think he has equipment something pour give us this information since the multiple version of adobe for 10 years?
Could you me filled in on this topic?
Thank you
the translation is not really understandable, but I understand through your last link is good and it works.
Thank you -
Script to get the disk and LUN informaiton
Hi all
I have the list of virtual machines on servers different vCente and I need to get the disk and LUN information for the list of virtual machines.
Help me build the script?
Kind regards
Vijay
$Information = @)
$Vminfo = get - VM | Select-Object *, @{N = "Hard drives"; E={$_ | Get-HardDisk}}, @{N = "HDDcount"; E={($_ | (Get-harddisk).length}}
$vmlist = $Vminfo | Sort-Object-down HDDcount
{foreach ($vm to $vmlist)
#$Harddiskinfo = $vm | Get-hard drive
$props = new-Object PSObject
$props | Add-member-name "Folder" - Membertype NoteProperty-value $vm.folder
$props | Add-member-name "VMName" - Membertype NoteProperty-value $vm. Name
$props | Add-Member-name "vCPUs" - Membertype NoteProperty-value $vm. NumCpu
$props | Add-member-name "Memory (GB)" - Membertype NoteProperty-value $vm. MemoryGB
$DiskNum = 0
foreach ($hdd in $vm. Hard drives) {}
$controllerinfo = $hdd. ExtensionData
$datastoreName = $($hdd.) Filename.Substring (1) - split ("]" ")) [0]
$datastoreinfo = get-$datastoreName data store
$controllerkey = $controllerinfo.controllerkey.tostring)
$keycount = ($controllerkey |) measure-object-character | Select-Object - expandproperty Characters) m:System.NET.SocketAddress.ToString)
$virtualID = "{0}: {1}: {2} ' f $controllerkey.substring (0,1), $controllerkey.substring ($keycount - 1), $hdd. ExtensionData.Unitnumber
$props | Add-Member-name "Disk scsiID$ ($DiskNum) '-Membertype NoteProperty-value $virtualID
$props | Add-member-name "$($DiskNum) hard disk drive"-Membertype NoteProperty-value $hdd. Name
$props | Add-member-name "Disk$ ($DiskNum) Size (GB)"-Membertype NoteProperty-value $hdd. CapacityGB
$props | Add-member-name "$($DiskNum) DatastoreName disc"-Membertype NoteProperty-value $datastoreName
$props | Add-member-name "$($DiskNum) DatastoreSize disc"-Membertype NoteProperty-value $datastoreinfo. CapacityGB
$props | Add-member-name "$($DiskNum) DatastoreFreeSpace disc"-Membertype NoteProperty-value $datastoreinfo. FreeSpaceGB
$DiskNum ++
}
$Information += $props
}
$Information | Out-GridView
Maybe you are looking for
-
The application under Tools-> Options tab does not save the swf . In , downloaded files do recognize that IE for a gaming platform adapted.
-
CQ61-313us: maestro also needing help code is 75957252
Maestro also needing help code is 75957252 for the bios password reset
-
is sky car compatible w/windows XP?
is sky car compatible w/windows XP?
-
When I try to reinstall WMP - 11, I can't go after the Windows Validation.
WMP - 9 is the only version of the media player that turns on. When I go to update wmp 9 requires that all the Explorer Windows to be closed with closing as wmp. When I try to comply with the Update window closes. When I try to reinstall wmp - 11, as
-
FbsSearchProviderIE8 application has stopped working
I have Vista Home Basic and just recently have this pop up on my computer when I turn it on. I have read some information on the forum, but it looks like the solutions is causing so many problems. I need to know how it fly away or cause damage in s