Class OmsGeopaparazzi4Converter
- java.lang.Object
-
- org.hortonmachine.gears.libs.modules.HMModel
-
- org.hortonmachine.gears.io.geopaparazzi.OmsGeopaparazzi4Converter
-
public class OmsGeopaparazzi4Converter extends HMModel
-
-
Field Summary
Fields Modifier and Type Field Description static StringCHARTS_FOLDER_NAMEstatic StringDESCRIPTIONbooleandoLoglinesbooleandoLogpointsbooleandoMediabooleandoNotesstatic StringEMPTY_STRINGStringinGeopaparazzistatic StringMEDIA_FOLDER_NAMEstatic StringOMSGEOPAPARAZZICONVERTER_DO_BOOKMARKS_DESCRIPTIONstatic StringOMSGEOPAPARAZZICONVERTER_DO_LOG_LINES_DESCRIPTIONstatic StringOMSGEOPAPARAZZICONVERTER_DO_LOG_POINTS_DESCRIPTIONstatic StringOMSGEOPAPARAZZICONVERTER_DO_MEDIA_DESCRIPTIONstatic StringOMSGEOPAPARAZZICONVERTER_DO_NOTES_DESCRIPTIONstatic StringOMSGEOPAPARAZZICONVERTER_IN_GEOPAPARAZZI_DESCRIPTIONstatic StringOMSGEOPAPARAZZICONVERTER_LABELstatic StringOMSGEOPAPARAZZICONVERTER_NAMEstatic StringOMSGEOPAPARAZZICONVERTER_OUT_DATA_DESCRIPTIONstatic StringOMSGEOPAPARAZZICONVERTER_TAGSStringoutFolderstatic StringTHE_GEOPAPARAZZI_DATABASE_FILE
-
Constructor Summary
Constructors Constructor Description OmsGeopaparazzi4Converter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.geotools.data.simple.SimpleFeatureCollectioncomplexNote2featurecollection(String noteName, IHMConnection connection, IHMProgressMonitor pm)Convert the comples notes identified by a name to a featurecollection.static HashMap<String,org.geotools.data.simple.SimpleFeatureCollection>complexNotes2featurecollections(IHMConnection connection, IHMProgressMonitor pm)Convert the complex notes to a map of featurecollection.static List<DaoGpsLog.GpsLog>getGpsLogsList(IHMConnection connection)Get the list of gps logs.static org.geotools.feature.DefaultFeatureCollectiongetLogLinesFeatureCollection(IHMProgressMonitor pm, List<DaoGpsLog.GpsLog> logsList)Convert the logs to a featurecollection.static org.geotools.data.simple.SimpleFeatureCollectionmedia2FeatureCollection(IHMConnection connection, File mediaFolderFile, IHMProgressMonitor pm)static org.geotools.data.simple.SimpleFeatureCollectionmedia2IdBasedFeatureCollection(IHMConnection connection, IHMProgressMonitor pm)static voidpopulateProfilesForSingleLog(DaoGpsLog.GpsLog log, int size, double[] xProfile, double[] yProfile, double[] xPlanim, double[] yPlanim, long[] timestampArray)Extracts profile information from logs.voidprocess()static org.geotools.data.simple.SimpleFeatureCollectionsimpleNotes2featurecollection(IHMConnection connection, IHMProgressMonitor pm)Convert the simple notes to a featurecollection.static voidwriteImageFromId(IHMConnection connection, long imageId, File newImageFile)-
Methods inherited from class org.hortonmachine.gears.libs.modules.HMModel
checkCancel, checkFileExists, checkNull, checkWorkingFolderInPath, concatOr, dumpRaster, dumpVector, getDefaultThreadsNum, getRaster, getVector, help, isCanceled, template
-
-
-
-
Field Detail
-
inGeopaparazzi
public String inGeopaparazzi
-
doNotes
public boolean doNotes
-
doLoglines
public boolean doLoglines
-
doLogpoints
public boolean doLogpoints
-
doMedia
public boolean doMedia
-
outFolder
public String outFolder
-
THE_GEOPAPARAZZI_DATABASE_FILE
public static final String THE_GEOPAPARAZZI_DATABASE_FILE
- See Also:
- Constant Field Values
-
DESCRIPTION
public static final String DESCRIPTION
- See Also:
- Constant Field Values
-
OMSGEOPAPARAZZICONVERTER_LABEL
public static final String OMSGEOPAPARAZZICONVERTER_LABEL
- See Also:
- Constant Field Values
-
OMSGEOPAPARAZZICONVERTER_TAGS
public static final String OMSGEOPAPARAZZICONVERTER_TAGS
- See Also:
- Constant Field Values
-
OMSGEOPAPARAZZICONVERTER_NAME
public static final String OMSGEOPAPARAZZICONVERTER_NAME
- See Also:
- Constant Field Values
-
OMSGEOPAPARAZZICONVERTER_OUT_DATA_DESCRIPTION
public static final String OMSGEOPAPARAZZICONVERTER_OUT_DATA_DESCRIPTION
- See Also:
- Constant Field Values
-
OMSGEOPAPARAZZICONVERTER_DO_BOOKMARKS_DESCRIPTION
public static final String OMSGEOPAPARAZZICONVERTER_DO_BOOKMARKS_DESCRIPTION
- See Also:
- Constant Field Values
-
OMSGEOPAPARAZZICONVERTER_DO_MEDIA_DESCRIPTION
public static final String OMSGEOPAPARAZZICONVERTER_DO_MEDIA_DESCRIPTION
- See Also:
- Constant Field Values
-
OMSGEOPAPARAZZICONVERTER_DO_LOG_POINTS_DESCRIPTION
public static final String OMSGEOPAPARAZZICONVERTER_DO_LOG_POINTS_DESCRIPTION
- See Also:
- Constant Field Values
-
OMSGEOPAPARAZZICONVERTER_DO_LOG_LINES_DESCRIPTION
public static final String OMSGEOPAPARAZZICONVERTER_DO_LOG_LINES_DESCRIPTION
- See Also:
- Constant Field Values
-
OMSGEOPAPARAZZICONVERTER_DO_NOTES_DESCRIPTION
public static final String OMSGEOPAPARAZZICONVERTER_DO_NOTES_DESCRIPTION
- See Also:
- Constant Field Values
-
OMSGEOPAPARAZZICONVERTER_IN_GEOPAPARAZZI_DESCRIPTION
public static final String OMSGEOPAPARAZZICONVERTER_IN_GEOPAPARAZZI_DESCRIPTION
- See Also:
- Constant Field Values
-
EMPTY_STRING
public static final String EMPTY_STRING
- See Also:
- Constant Field Values
-
MEDIA_FOLDER_NAME
public static final String MEDIA_FOLDER_NAME
- See Also:
- Constant Field Values
-
CHARTS_FOLDER_NAME
public static final String CHARTS_FOLDER_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
simpleNotes2featurecollection
public static org.geotools.data.simple.SimpleFeatureCollection simpleNotes2featurecollection(IHMConnection connection, IHMProgressMonitor pm) throws Exception
Convert the simple notes to a featurecollection.- Parameters:
connection- the db connection.pm- the monitor.- Returns:
- the extracted collection.
- Throws:
Exception
-
complexNotes2featurecollections
public static HashMap<String,org.geotools.data.simple.SimpleFeatureCollection> complexNotes2featurecollections(IHMConnection connection, IHMProgressMonitor pm) throws Exception
Convert the complex notes to a map of featurecollection.- Parameters:
connection- the db connection.pm- the monitor.- Returns:
- the extracted collection as name-collection map..
- Throws:
Exception
-
complexNote2featurecollection
public static org.geotools.data.simple.SimpleFeatureCollection complexNote2featurecollection(String noteName, IHMConnection connection, IHMProgressMonitor pm) throws Exception
Convert the comples notes identified by a name to a featurecollection.- Parameters:
noteName- the name of the note to extract.connection- the db connection.pm- the monitor.- Returns:
- the extracted collection.
- Throws:
Exception
-
getGpsLogsList
public static List<DaoGpsLog.GpsLog> getGpsLogsList(IHMConnection connection) throws Exception
Get the list of gps logs.- Parameters:
connection- the db connection.- Returns:
- the list of gps logs.
- Throws:
Exception
-
getLogLinesFeatureCollection
public static org.geotools.feature.DefaultFeatureCollection getLogLinesFeatureCollection(IHMProgressMonitor pm, List<DaoGpsLog.GpsLog> logsList)
Convert the logs to a featurecollection.- Parameters:
pm- the monitor.logsList- the list of logs as gathered fromgetGpsLogsList(IHMConnection).- Returns:
- the extracted collection.
- Throws:
Exception
-
populateProfilesForSingleLog
public static void populateProfilesForSingleLog(DaoGpsLog.GpsLog log, int size, double[] xProfile, double[] yProfile, double[] xPlanim, double[] yPlanim, long[] timestampArray)
Extracts profile information from logs.- Parameters:
log- the log to analyze.size- the number of points in the log (as off: int size = log.points.size(); )xProfile- the array of to put the progressive distance in.yProfile- the array of to put the elevation in.xPlanim- the array of to put the x coord in.yPlanim- the array of to put the y coord in.timestampArray- the array of to put the times in.
-
media2FeatureCollection
public static org.geotools.data.simple.SimpleFeatureCollection media2FeatureCollection(IHMConnection connection, File mediaFolderFile, IHMProgressMonitor pm) throws Exception, IOException, FileNotFoundException
-
media2IdBasedFeatureCollection
public static org.geotools.data.simple.SimpleFeatureCollection media2IdBasedFeatureCollection(IHMConnection connection, IHMProgressMonitor pm) throws Exception, IOException, FileNotFoundException
-
writeImageFromId
public static void writeImageFromId(IHMConnection connection, long imageId, File newImageFile) throws Exception
- Throws:
Exception
-
-