Skip to content
Permalink
Browse files

[GRASS][FEATURE] vector import via browser drag and drop

  • Loading branch information
blazek committed May 18, 2015
1 parent e474e09 commit 7091d3bef8125a61515f4c3fba8b86e126f8e770
@@ -172,6 +172,24 @@ MACRO(ADD_GRASSLIB GRASS_BUILD_VERSION)
)
ENDIF (GRASS_MAJOR_VERSION LESS 7 )

#
# grass vector import module
#
ADD_EXECUTABLE(qgis.v.in${GRASS_BUILD_VERSION} ../qgis.v.in.cpp)
SET_TARGET_PROPERTIES(qgis.v.in${GRASS_BUILD_VERSION} PROPERTIES
COMPILE_FLAGS "-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\" \"-DGRASS_LIB_EXPORT=${DLLEXPORT}\" \"-DGRASS_EXPORT=${DLLIMPORT}\""
)
TARGET_LINK_LIBRARIES(qgis.v.in${GRASS_BUILD_VERSION}
qgisgrass${GRASS_BUILD_VERSION}
${GRASS_LIBRARY${GRASS_BUILD_VERSION}_gis}
${GRASS_LIBRARY${GRASS_BUILD_VERSION}_datetime}
${GRASS_LIBRARY${GRASS_BUILD_VERSION}_vect}
${GRASS_LIBRARY${GRASS_BUILD_VERSION}_dbmibase}
${GRASS_LIBRARY${GRASS_BUILD_VERSION}_dbmiclient}
${GDAL_LIBRARY}
qgis_core
)

########################################################
# Install

@@ -188,7 +206,11 @@ MACRO(ADD_GRASSLIB GRASS_BUILD_VERSION)
RUNTIME DESTINATION ${QGIS_PLUGIN_DIR}
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR})

INSTALL(TARGETS qgis.d.rast${GRASS_BUILD_VERSION} qgis.g.info${GRASS_BUILD_VERSION} qgis.r.in${GRASS_BUILD_VERSION}
INSTALL(TARGETS
qgis.d.rast${GRASS_BUILD_VERSION}
qgis.g.info${GRASS_BUILD_VERSION}
qgis.r.in${GRASS_BUILD_VERSION}
qgis.v.in${GRASS_BUILD_VERSION}
RUNTIME DESTINATION ${QGIS_LIBEXEC_DIR}/grass/modules
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
@@ -43,11 +43,6 @@ extern "C"
#include "qgsrasterblock.h"
#include "qgsgrass.h"

//#ifdef _MSC_VER
//#define INFINITY (DBL_MAX+DBL_MAX)
//#define NAN (INFINITY-INFINITY)
//#endif

#if GRASS_VERSION_MAJOR >= 7
#define G_allocate_raster_buf Rast_allocate_buf
#define G_close_cell Rast_close
@@ -68,15 +63,13 @@ extern "C"
int main( int argc, char **argv )
{
char *name;
struct GModule *module;
struct Option *map;
struct Cell_head window;
int cf;

G_gisinit( argv[0] );

module = G_define_module();
module->description = ( "Output raster map layers in a format suitable for display in QGIS" );
G_define_module();

map = G_define_standard_option( G_OPT_R_OUTPUT );

@@ -94,9 +87,6 @@ int main( int argc, char **argv )
qint32 rows, cols;
stdinStream >> extent >> cols >> rows;

//G_fatal_error("i = %d", i);
//G_fatal_error( extent.toString().toAscii().data() );

QString err = QgsGrass::setRegion( &window, extent, rows, cols );
if ( !err.isEmpty() )
{
@@ -107,7 +97,6 @@ int main( int argc, char **argv )

QGis::DataType qgis_type;
qint32 type;
//stdinStream >> grass_type;
stdinStream >> type;
qgis_type = ( QGis::DataType )type;

0 comments on commit 7091d3b

Please sign in to comment.
You can’t perform that action at this time.