i am new with WebGL, i want to ask, is there any way to use .wrl file in WebGL without converting in some another types (like .json, .obj etc.)?
WebGL API accepts ArrayBuffers only. Even if your model is .json or .obj, WebGL cant read them, data are being passed in ArrayBuffers. Engine (js engines like three.js, playcanvas, babylon.js) needs to parse model files first.
So WebGL itself can't read .wrl files or any other, but javascript can read binary files => some better engines can accept files with various extensions and work with them, like Three.js with github = https://github.com/lorennorman/octocat-3d/blob/master/stl/octocat_base.stl
I dont know any javascript .wrl reader/parser, but it should be possible to write one.
EDIT
Three.js might accept .wrl files, but I was unable to do so. Read more here: https://github.com/mrdoob/three.js/issues/3728
Related
alright, I have a geojson file that is about 10MB, normal browser based editors fail for obvious reasons, so is there any geojson editor that is powerful enough to edit a 10MB file? and I am not talking about just a JSON editor.
I made in the past good experience with https://vector.rocks/.
It is an online GeoJSON editor that can work with large files. Disadvantageous is the limited functionality of the tool.
I would also check if you really need a 10MB file.
Depending on your application it might be worth compressing the file to make it easier to work with.
At https://mapshaper.org/ you can load a GeoJSON file (even very large files) and download it with reduced size but lower precision.
If both solutions are not suitable for you, you will probably have to get used to a professional GIS software.
Some of the most popular free softwares are:
QGIS (https://qgis.org)
gvSIG (http://www.gvsig.com/en/products/gvsig-desktop)
GRASS (https://grass.osgeo.org/)
They all can easily deal with 10MB files but it will but it will take you some time until you are used to the editing functions.
While designed for editing OSM, I find JOSM to also be a powerful desktop editor for large geoJSON files:
https://josm.openstreetmap.de/
You'll just want to be careful working with polygons, because JOSM doesn't directly support geoJSON polygons – they instead used a "closed way" linestring, but there is a patch:
https://josm.openstreetmap.de/ticket/17453
https://josm.openstreetmap.de/ticket/18902
Beyond polygons, JOSM is well suited for working with geoJSON linestrings and points
I want to develop some simulation software. It produces long arrays of data. Is it good idea to store this data in mkv file with custom codec ? The goal of it is to get fast random access to data and avoid headache with handling big arrays(bigger then 32bit address space)
And if so, is there are any simple mkv c++ library ?
Also, mkv is a specific application of EBML, a sort of binary xml language, optimized for media. If you decided the features are right for you, EBML would be what you would use, which would allow you to customize for your specific application.
mkv is the file extension for the Matroska format, which would help you with your search.
Here is the Matroska source code page, which includes links to EBML and Matroska c libraries.
http://www.matroska.org/team/source-code.html
I'm pretty sure the things you get from mkv are nowhere near as sophisticated for scientific (simulation) data as HDF5. It was designed for exactly the use case you describe.
How can I write a script or program to manipulate Adobe Photoshop files? I'd like to be able to do something like read a Adobe PSD file, rename the layers, and save it back to a PSD format.
The files look to be saved with a combination of XML and serialized data. I looked at the file's code and see that it has <x:xmpmeta near the start, did some google searching to find the wikipedia article about xmp - Extensible Metadata Platform, but I'm unclear if that is the format for the entire file or just for the metadata portion.
I saw that there is a PSD parser class for PHP available, and not a bad article about how to use it, although it seems like it is just for reading / converting and not for writing / saving.
But I'd like to know:
What format are these files stored in?
Where are the guidelines for interfacing with that format?
Are there some classes / tools available for manipulating that file format? Any language would be fine for a start.
I'm happy to do more research on my own but I'm hoping for some guidance to know what I should be looking for.
I'm not familiar with it myself, but there is an official SDK for Photoshop available that should let you do all that and more with .psd files.
There are not so many options. The general advice would be to look into buying Adobe InDesign Server. In some cases it can be cost prohibitive and you might be interested in 3-party SDKs. Unfortunately there are a few options in the market. One of them is Graphics Mill image processing SDK (http://www.graphicsmill.com/photoshop-psd).
Disclaimer: I work for Aurigma which runs Graphics Mill project.
I've been doing some head banging on this one and solicit your advice.
I am building an app that as part of it's features is to present PDF forms; meaning display them, allow fields to be changed and save the modified PDF file back out. UIWebViews do not support PDF interactive forms.
Using the CGPDF apis (and benefit from other questions posted here and elsewhere), I can certainly present the PDF (without the form fields/widgets), scan and find the fields in the document, figure out where on the screen to draw something and make them interactive.
What I can't seem to figure out is how to change the CGPDFDictionary objects and write them back out to a file. One could use the CGPDF Apis to create a new PDF document from whole cloth, but how do you use it to modify an existing file?
Should I be looking elsewhere such as 3rd party PDF libs like PoDoFo or libHaru?
I'd love to hear from anyone who has successfully modified a PDF and written it back out as to your approach.
I once did this incredibly cheaply by munging through the PDF -- I mean using regular expressions -- and just dirtily changing the actual raw text of the raw PDF data file.
It can work perfectly in simple situations where you are easily able to find the value in question.
No idea what you're trying to do here but a lateral thought! Hope it helps!
Is there any difference or advantages using binary a file or XML file with
TClientDataSet.
Binary will be smaller and faster.
XML will be more portable and human readable.
The Binary file will be a little smaller.
The main advantage of the XML format is that you can pass it around via http(s) protocols.
Binary is smaller and faster, but only readable by TClientDataSets.
XML is larger and slower (both are not that bad, i.e. not by orders of magnitude bigger or slower).
XML is readable by people (not recommended in general, but it is doable), and software.
Therefore it is more portable (as Nick wrote).
TClientDataSets can load and save their own style of XML, or you can use the Delphi XML Mapper tool to read and write any kind of XML.
XSLT can for instance be used to transform those XML files into any kind of text, including other XML, HTML, CSV, fixed columns, etc.
In contrast to what Tim indicates, both binary and XML can be transferred through HTTP and HTTPS. However, it is often appreciated sending XML as it is easier to trace.
Without having tested it: I guess the binary format would be quite a lot faster when reading and writing. You'd better do your own benchmarks for that, though.
Another advantage of binary might be, that it cannot be easily edited which prevents people from mucking up the data outside the application.
When using Delphi 2009, we have noticed that if the file has an extension of .XML, it will not save in binary format over an existing dfXMLUTF8 format, even with a LoadFromFile, SaveToFile. Changing the file extension to something else (.DAT, for example) allows saving the file in dfBinary. Our experience is that the binary file, in addition to being somewhat more difficult for the end-user to manipulate (a plus!), is approximately 50% smaller than the dfXMLUTF8 format file.