Showing posts with label GIS. Show all posts
Showing posts with label GIS. Show all posts

November 5, 2014

Multiple ring buffer problem in ArcGIS: ERROR 000227


I was trying to use multiple buffer tool to my data for some analysis. I was using 1521 points shapefile and I wanted to buffer each point with 100m, 200m and 500m. I gave the parameters as shown in figure.



Then the tool gives the error message as
GP ERRORS:
ERROR 999999: Error executing function.
Invalid Topology [Incomplete void poly.]
Failed to execute (Dissolve).


PYTHON ERRORS:
Traceback Info:
  File "<string>", line 193, in multiringbuffer

Error Info:
    <class 'arcgisscripting.ExecuteError'>: ERROR 999999: Error executing function.
Invalid Topology [Incomplete void poly.]
Failed to execute (Dissolve).


ERROR 000227: Cannot Multiple Ring Buffer
Completed script MultipleRingBuffer...
Failed to execute (MultipleRingBuffer).
End Time: Fri Oct 10 22:15:17 2014 (Elapsed Time: 5 minutes 26 seconds)

Documentation help regarding the tool is useless. It gives the description as “The tool failed trying to access the values from the parameter” and solution as “Evaluate whether the parameter values used are accurate and the correct data type”.

I changed the “Dissolve option (optional)” to “NONE” from “ALL”. The tool gave the output file for the same data. I think the problem is with dissolving overlapping boundary for a large dataset. So I used few point features of same shapefile with “Dissolve option (optional)” as “ALL”, this time tool worked well and created correct output.

Steps to resolve the problem:
Go to standard menu bar -> Tools -> Customize -> Command tab -> type “Buffer Wizard” in “show command containing” -> in categories “Tools” will appear & in command “Buffer Wizard” will appear -> drag that “Buffer Wizard” tool to any toolbar.

  


Use the tool with appropriate options. The tool will gives you more options than usual “Buffer” tool.

March 28, 2011

GeoTools DbaseFileReader Sample Code

           
           

I observed that, the code given in geotools documentation  is wrong. The statement missing semi colon and major mistake is DbaseFileReader constructor is passing single argument. Actually there is no such constructor.
This sample code read the DBF file and display the row on console.

I am using NetBeans 6.9.1 , JDK 6 and GeoTools 7.2.1

I used following classes

import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.channels.FileChannel.*;
import org.geotools.data.shapefile.dbf.DbaseFileReader;        


Following code read the DBF file from c: drive with the name jal.dbf. You can change the file name with your file location. You can paste this code to your command button event listener method.

Code:-
File selectedFile = jFileChooser1.getSelectedFile();
FileChannel in = null;
        try {
           in = new FileInputStream(selectedFile).getChannel();        //read the DBF file //Dynamic path
           //in = new FileInputStream("c://jal.dbf").getChannel();       //Static path   
        } catch (FileNotFoundException ex) {
            Logger.getLogger(SearchengineView.class.getName()).log(Level.SEVERE, null, ex);
        }
    DbaseFileReader r = null;
    try {
    r = new DbaseFileReader (in, false,Charset.forName("ISO-8859-1"));  //line was wrong in original code
    } catch (IOException ex1) { }

    Object[] fields = new Object[r.getHeader().getNumFields()];
    while(r.hasNext())
    {
            try {
                r.readEntry(fields);
                System.out.println(r.readRow());   //display the row on console
              } catch (IOException ex) {
                Logger.getLogger(SearchengineView.class.getName()).log(Level.SEVERE, null, ex);
            }
    }
        try {
            r.close();
        } catch (IOException ex) {
            Logger.getLogger(SearchengineView.class.getName()).log(Level.SEVERE, null, ex);
        }

           
           
         

January 29, 2010

Geographical Information System V/S Geographical Information Science

There has been healthy debate in the past decade or so about GI Systems versus GI Science (or as Wright et al (1997) called it: tool or science?). Today the debate is over and there is consensus about the value of both GI Systems and GI Science and a requirement to use both in tandem. GI Science allows us to consider the philosophical, epistemological and ontological contexts of geographic information and GI Systems provide the infrastructure, tools and methods for tackling real world problems within acceptable timeframes. It is possible to undertake GI science without GI Systems thinking and technology (for example using a pencil and paper, or a calculator), but it is very inefficient and unproductive. Similarly, using GI Systems without a clear understanding of the scientific context and key scientific methods will produce results which are suspect at best and may even be wholly inappropriate or even incorrect.
GI Systems can be used to turn data into information using the many tools and geoprocessing methods common to today’s systems. GI science provides the underlying principles and contextual understanding of when to use the tools, how they work and the way to interpret the resulting information. More importantly, GI science gives us a framework and a workflow for allowing us to turn information into evidence and then knowledge. By applying knowledge successfully over multiple years, we can build our wisdom about the world. GI scientists are interested in examining the fundamental principles that underlie GIS, that is to say the basic models, methods and generally held tenants of geography and geographic information. They are also interested in using GI Systems in scientific investigations to create new geographic knowledge.

Source: GIS development magazine Jan-2010

Popular Posts