crotwell / seisFile

A library for reading and writing seismic file formats in java.
GNU Lesser General Public License v3.0
27 stars 20 forks source link

Writing QuakeML and StationXML files #6

Open jkocot opened 7 years ago

jkocot commented 7 years ago

Hi, Have you considered adding support for creating QuakeML and StationXML files from the seisFile objects? Currently I see that all the related objects take as argument an XMLEventReader, which prevents them from being created outside the XML (in purpose of being written to it). You might also consider using JAXB to make the XML R/W process more lightweight...

crotwell commented 7 years ago

I have not had a need for writing QuakeML or StationXML aside from dumping the entire xml returned from a server, so the code is really aimed at just reading and parsing. Writing would be nice, but I doubt I will have time to add it anytime soon. Will leave this issue open in case I do find a need and have time.

Personally I am not a big fan of automapping systems like JAXB. They work great 90% of the time, but are a pain when they don't. But I have a vague recollection that the IRIS-WS library has StationXML and/or QuakeML objects that used JAXB. You might want to look at that as an alternative. I don't know if they have support for writing or if it is read-only as well. http://ds.iris.edu/ds/nodes/dmc/manuals/iris-ws/

jkocot commented 7 years ago

Thanks, I'll check also the iris-ws library (however, we already use yours for seed files). As to JAXB, I fully understand your objections :D but sometimes it is quicker to use it (sometimes not).

jvilcan commented 5 years ago

Load SAC data files into database last long time. For instance, one-component SAC file of 1 hour lasts more than 3 minutes. Is it ok? Is there a way to load more quickly?. importsac