Export Geometry to WKT or WKB but include ARCs too - Do not densify
Dear all,
I have been having some issues when exporting the spatial data to WKT or WKB. I can get the WKT without any problems but the issue is that all ARCs are not exported as ARCs but rather as line segments. Looks like during the export process there is some Densify process that gets run.
Can someone please help me if there is a way to export the ARCs as ARCs and do not densify.
WKT has support for Circular Arcs so there should be no problems.
And the second problem was that when i export to WKB this data can not be read by SQL Server or any other tool.
Any advice much apprciated.
Dan
Dan,
Without actual examples we cannot help you solve you problem.
Here are some tests I ran in Oracle and SQL Server.
Oracle Export
select a.name, a.geom.get_wkt() as text
from (select 'Line segment' as name,sdo_geometry (2002, null, null, sdo_elem_info_array (1,2,1), sdo_ordinate_array (10,10, 20,10)) as geom from dual union all
select 'Line string' as name,sdo_geometry (2002, null, null, sdo_elem_info_array (1,2,1), sdo_ordinate_array (10,25, 20,30, 25,25, 30,30)) as geom from dual union all
select 'Arc segment' as name,sdo_geometry (2002, null, null, sdo_elem_info_array (1,2,2), sdo_ordinate_array (10,15, 15,20, 20,15)) as geom from dual union all
select 'Arc string' as name,sdo_geometry (2002, null, null, sdo_elem_info_array (1,2,2), sdo_ordinate_array (10,35, 15,40, 20,35, 25,30, 30,35)) as geom from dual union all
select 'Closed arc string' as name,sdo_geometry (2002, null, null, sdo_elem_info_array (1,2,2), sdo_ordinate_array (15,65, 10,68, 15,70, 20,68, 15,65)) as geom from dual union all
select 'Compound line string' as name,sdo_geometry (2002, null, null, sdo_elem_info_array (1,4,3, 1,2,1, 3,2,2, 7,2,1), sdo_ordinate_array (10,45, 20,45, 23,48, 20,51, 10,51)) as geom from dual union all
select 'Closed mixed line' as name,sdo_geometry (2002, null, null, sdo_elem_info_array (1,4,2, 1,2,1, 7,2,2), sdo_ordinate_array (10,78, 10,75, 20,75, 20,78, 15,80, 10,78)) as geom from dual
) a;
-- results
NAME TEXT
Line segment LINESTRING (10.0 10.0, 20.0 10.0)
Line string LINESTRING (10.0 25.0, 20.0 30.0, 25.0 25.0, 30.0 30.0)
Arc segment CIRCULARSTRING (10.0 15.0, 15.0 20.0, 20.0 15.0)
Arc string CIRCULARSTRING (10.0 35.0, 15.0 40.0, 20.0 35.0, 25.0 30.0, 30.0 35.0)
Closed arc string CIRCULARSTRING (15.0 65.0, 10.0 68.0, 15.0 70.0, 20.0 68.0, 15.0 65.0)
Compound line string COMPOUNDCURVE ((10.0 45.0, 20.0 45.0), CIRCULARSTRING (20.0 45.0, 23.0 48.0, 20.0 51.0), (20.0 51.0, 10.0 51.0))
Closed mixed line COMPOUNDCURVE ((10.0 78.0, 10.0 75.0, 20.0 75.0, 20.0 78.0), CIRCULARSTRING (20.0 78.0, 15.0 80.0, 10.0 78.0))
7 rows selectedNo densification there.
SQL Server Denali Import
Now, take the above WKT and import into SQL Server.
select geometry::STGeomFromText('LINESTRING (10.0 10.0, 20.0 10.0)',0).STAsText() as text union all
select geometry::STGeomFromText('LINESTRING (10.0 25.0, 20.0 30.0, 25.0 25.0, 30.0 30.0)',0).STAsText() as text union all
select geometry::STGeomFromText('CIRCULARSTRING (10.0 15.0, 15.0 20.0, 20.0 15.0)',0).STAsText() as text union all
select geometry::STGeomFromText('CIRCULARSTRING (10.0 35.0, 15.0 40.0, 20.0 35.0, 25.0 30.0, 30.0 35.0)',0).STAsText() as text union all
select geometry::STGeomFromText('CIRCULARSTRING (15.0 65.0, 10.0 68.0, 15.0 70.0, 20.0 68.0, 15.0 65.0)',0).STAsText() as text union all
select geometry::STGeomFromText('COMPOUNDCURVE ((10.0 45.0, 20.0 45.0), CIRCULARSTRING (20.0 45.0, 23.0 48.0, 20.0 51.0), (20.0 51.0, 10.0 51.0))',0).STAsText() as text union all
select geometry::STGeomFromText('COMPOUNDCURVE ((10.0 78.0, 10.0 75.0, 20.0 75.0, 20.0 78.0), CIRCULARSTRING (20.0 78.0, 15.0 80.0, 10.0 78.0))',0).STAsText() as text ;
-- results
LINESTRING (10 10, 20 10)
LINESTRING (10 25, 20 30, 25 25, 30 30)
CIRCULARSTRING (10 15, 15 20, 20 15)
CIRCULARSTRING (10 35, 15 40, 20 35, 25 30, 30 35)
CIRCULARSTRING (15 65, 10 68, 15 70, 20 68, 15 65)
COMPOUNDCURVE ((10 45, 20 45), CIRCULARSTRING (20 45, 23 48, 20 51), (20 51, 10 51))
COMPOUNDCURVE ((10 78, 10 75, 20 75, 20 78), CIRCULARSTRING (20 78, 15 80, 10 78))Can you provide us with similar examples where the process fails?
And the second problem was that when i export to WKB this data can not be read by SQL Server or any other tool.Let's try and solve the first problem before the second. Are Oracle and SQL Server both on the same hardware?
regards
Simon
Similar Messages
-
Sql to convert mdsys.geometry to wkt or wkb
I've been looking through the sdoapi for 10g (the only available now) for a way to convert a geometry column to wkt or wkb. There was a method with the old version (get_wkt and get_wkb). Does anyone know how to do it with the 10g sdoapi
Mike SmithOur Java code actually does have a (protected) member variable or switch, representing whether the output by default should be big-endian or little-endian.
However, the SQL/mm standard does not define any parameter to determine the output encoding. Neither have we added any proprietary signature to that effect. Thus, the Java constructor sets the switch to "big-endian".
On the other hand, when the Java code reads WKB, the WKB specifies whether it is encoded in little-endian or in big-endian. This is why we can read both encodings.
If there is a requirement to also write both encodings, we could add a function specifying the output encoding.
Mike -
I want to sync my Voice Memos but iTunes 10.5 will not let me even with the "include voice memos" checkbox selected. As well Ive deselected all the music in itunes so when I sync there will be none on my phone but itunes also ignores this request and puts purchased music back on. I do not have autofill selected. Also wondering where the backup of my iphone 4s is located on my hard disk. Any help greatly appreciated.
Sorry thats itunes 11.5
-
I am trying to download Photoshop CS6 onto my Mac from the Adobe website, but I do not have a serial number. I made an Adobe ID, but the serial number is not under "My Products" nor have I received an email including a serial number. I do not know how else to find the serial number. Please help!
You need to contact Adobe Support either by chat or via phone when you have serial number and activation issues.
Here is a link to a page with options to help make contact:
http://www.adobe.com/support/download-install/supportinfo/ -
How to add a privacy page and exclude it from the main menu, but include in links at the base
adding a privacy statement page and excluding it from the main menu, but including in links at the base of site
Right click on the page in Plan view and choose to exclude from menus. This will take it off your main nav.
For your bottom nav, change the menu to manual and add the privacy page manually. -
I'm trying to export a raw image from lightroom 5.6 to Photoshop cc 2014 2.1. I right click to export menu in lightroom as I've always done to export to Photoshop. Photoshop opens, but it can't open file, window opens to find a file to open. I'd like this to export my lightroom images to edit in photoshop as it has always been able to do for me. What fix do you recommend?
Hi Ashley Clavette,
The Initial view setting works perfectly when the file is opened in Acrobat after setting the desired Initial View.
When you upload the file onto Wordpress, and view it on that website in the browser...it might be using a different pdf handler program which might be causing this issue ( it would be helpful, if you could provide the screenshot) , however when you download the pdf again from wordpress server...and open in Acrobat/Reader...then what exactly happens ? Does the pdf opens in the desired Initial View setting?
Rahul -
Help! I have an Adobe Premiere Pro CC 2014 sequence @ 59.94 fps and need to export the video as 23.976 but the final video render looks glitchy! Please Help!
I made a new sequence at 23.976 and imported my 1280x720 59.94 video into the sequence... when i rendered it out it looks glitchy!
my client is not allowing 1280 x720 59.94 video files they want 29.97 progressive,25,24,or 23.98
Please Help what do i do! where did i go wrong! this is horrible omg!!!! please help!
Thank you!Nice!
In my export setting i switched the frame rate to 29.97 and it looks good to me!
Thank you! -
I am trying to export a video as an flv but the list of possible formats is much shorter than it used to be. I cannot find any way to make an FLV using the newest version of Premiere Pro. Need help fast! I am on a Mac
Support for exporting to FLV and F4V has been removed. To learn more, please consult this blog post: removal of FLV and F4V export features from Adobe Media Encoder, After Effects, and Premiere Pro | After Effects regio…
-
I have adobe export PDF since a few months but since yesterday I can't export my PDF documents to word ! can you tell me how to do it again?
Hi ceop,
It seems earlier you were able to use it.
It is not clear why you are facing this issue now.
You can try it with another pdf file,It might be possible that there is some issue with your pdf file.
Regards,
Florence -
windows live mail having problem after joining in domain examples incoming is good but sent or outgoing is not there and also send mails are not exporting at the time of live mail exporting time?
This is not usually related to AD issues, but it may be more of a DNS issue. I posted a request in your other thread to post an unedited ipconfig /all of the DC and of the client.
This may help use diagnose this issue and your other thread's printer issues.
Thank you,
Ace Fekay
MVP, MCT, MCSE 2012, MCITP EA & MCTS Windows 2008/R2, Exchange 2013, 2010 EA & 2007, MCSE & MCSA 2003/2000, MCSA Messaging 2003
Microsoft Certified Trainer
Microsoft MVP - Directory Services
Complete List of Technical Blogs: http://www.delawarecountycomputerconsulting.com/technicalblogs.php
This posting is provided AS-IS with no warranties or guarantees and confers no rights. -
I exported a pages document to word, but was not able to edit the new word document.
i exported a pages document to word, but was not able to edit the new word document.
I have a OSX IMAC Version 10.8.5. I got pages at the same time I purchased this computer. I use a document to write all my passwords. Seems like when I E-mail myself the document from pages, I have not been able to type in the document, it acts like it is locked. I checked all the "lock" and "unlock" fields, and none of them were locked. I notice the document says PDF. How do I correct this? Seems like I've tried everything. If you can help, that would be great!
-
I exported a pdf file to word but i can't edit
I exported a pdf file to word but i can't edit. What am I doing wrong?
Hi hc69,
You're most likely doing nothing wrong! For starters, please try triple-clicking in the text that you want to edit in Word.
If that doesn't work, it may be that the PDF was created from a scanned page, and that OCR (optical character recognition) wasn't performed on that PDF to convert the scanned/image text to selectable/editable text. OCR is enabled by default when you convert via the ExportPDF website, but can be disabled in Reader. Please see How to disable Optical Character Recognition (O... | Adobe Community to make sure OCR is enabled.
Let's start there. If neither of those solutions work, we can take it from there.
Best,
Sara -
Hi i just bought tyhe product Export PDFs to Word and Excel . but ni only sussace conver the small file ,the large file such as n3000kb ,it can't work, please tell what can i do now thanks
Hi i just bought tyhe product Export PDFs to Word and Excel . but ni only sussace conver the small file ,the large file such as n3000kb ,it can't work, please tell what can i do now thanks@
-
Paid for export PDF, worked for a while, but now tells me i only have free service so won't convert document
Hi dmkelec,
I did not find your account under the given email id.
Can you provide me the email id associated with your subscription that would be helpful.
Regards,
Florence -
how do you import RSS feeds into FF? i have exported opml file out of IE8 but can't find how to import this into FF?
See OPML Support: https://addons.mozilla.org/firefox/addon/2625
Maybe you are looking for
-
Profit Center population in the Vendor and Customer Line items
hello our client is asking for getting profit center in the vendor and customer line items where in the view FBL5n and fbl1n we are not getting the profit center populated - in the new gl i understand that there is a standard report based on the gl
-
An Error has occurred: File Repository server input is down
Hello Team, I am getting the following error message "An Error has occurred: File Repository server input is down" when try to upload exel or any other document in repository using . NET Infoview. Even with the Admin account. and If i try the same s
-
Speakers not working correctly
I have a hp laptop, under a year old, my speakers only work when i have my earphones plugged in. But I can sometimes click on the speaker icon and I will get sound for a second or two and then shuts off again.
-
Hi I have 3 tables like, LIST (ID NUMBER, NAME) LIST_VERSION (ID NUMBER, VER NUMBER, STATE_CODE number) STATE_CODES (CODE NUMBER, DESC VARCHAR2) LIST to LIST_VERSION is one to many relation. I have a query like this, SELECT LV.* from LIST_VERSION WHE
-
Is there a Search for Unused files??
Hi, I'm on DW CS3 and maybe I'm being lazy here, but is there a way to search for Unused files in your site ? My site could use some cleanup and it would be a major help to have something like this rather than scouring through every file one by one.