Project

General

Profile

« Previous | Next » 

Revision 2598

Added by harris about 19 years ago

Added a target called metacat spatial to build the spatial stuff.

View differences:

src/spatial/cpp/metacat_shapefile.cpp
143 143

  
144 144

  
145 145
/** getUsage -- function that prints to stdout the usage for this driver */
146
void getUsage()
146
static void getUsage()
147 147
{
148
  cout<<"usage: metacat2shape metacat_export.txt test.shp
148
  std::cout<<"usage: metacat2shape metacat_export.txt test.shp\n\n";
149
  std::cout<<"  where:\n\n";
150
  std::cout<<"    input -- is an input ASCII file, that contains the following cols:\n";
151
  std::cout<<"          -> docid -- the document id\n";
152
  std::cout<<"          -> x -- the xlocation\n";
153
  std::cout<<"          -> y -- the y location\n";
154
  std::cout<<"          -> url -- the url to the document\n";
149 155

  
150
    where:
151
            input -- is an input ASCII file, that contains the following cols:
152
             -> docid -- the document id
153
             -> x -- the xlocation
154
             -> y -- the y location
155
             -> url -- the url to the document
156
  std::cout<<"          shapefile -- {output} is a ESRI shapefile\n\n";
156 157

  
157
            shapefile -- {output} is a ESRI shapefile
158
  std::cout<<"  see:\n";
159
  std::cout<<"  example: metacat2shape metacat_export.txt test.shp\n\n";
158 160

  
159
    see:
160
    example: metacat2shape metacat_export.txt test.shp
161
  std::cout<<"  ##><><><><><><><><><><><><><><><><><><><><><><><><>##\n";
162
  std::cout<<"  ##           John Harris                           ##\n";
163
  std::cout<<"  ##           harris@nceas.ucsb.edu                 ##\n";
164
  std::cout<<"  ##           Copyright 1999-2003                   ##\n";
165
  std::cout<<"  ##><><><><><><><><><><><><><><><><><><><><><><><><>##\n";
166
  
167
  std::cout << std::endl;
161 168

  
162
    ##><><><><><><><><><><><><><><><><><><><><><><><><>##
163
    ##           John Harris                           ##
164
    ##           harris@nceas.ucsb.edu                 ##
165
    ##           Copyright 1999-2003                   ##
166
    ##><><><><><><><><><><><><><><><><><><><><><><><><>##
167
    "<<endl;
168

  
169 169
}
170 170

  
171 171

  
build.properties
81 81
# If no value is specified, all users will be allowed to submit documents.
82 82
deniedSubmitters=
83 83

  
84
## Metacat Spatial options
85
shapelib.dir=/home/harris/development/shapelib-1.2.10/
build.xml
1219 1219
         <arg value="${docid}"/>
1220 1220
     </java>
1221 1221
  </target>
1222
  
1223
  <target name="spatial_option" depends="init" description=" -- compiles code for the spatial option">
1224

  
1225
    <echo message="Compiling the metatcat shapefile creator"/>
1226
    <echo message="using the shapelib at: ${shapelib.dir}"/>
1227
    <exec dir="." executable="g++" os="Linux, Unix" failonerror="true">
1228
     <arg line="./src/spatial/cpp/metacat_shapefile.cpp -I ${shapelib.dir} -c -o build/metacat_shapefile.o" />
1229
    </exec>
1230
  
1231
    <exec dir="." executable="g++" os="Linux, Unix" failonerror="true">
1232
     <arg line="build/metacat_shapefile.o ${shapelib.dir}/libshp.a -o bin/test.out" />
1233
    </exec>
1234
  </target>
1235

  
1222 1236
</project>

Also available in: Unified diff