Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Re: Work required for (was:) Spatial Operation andEditing Tools

On Thu, 2007-01-25 at 07:11 -0800, jeichar@xxxxxxxxxxxxxxx wrote:
> I think I missed the first part of this conversation.  Could I get some 
> background on the problems you are having?
> 
> Jesse

Hey Jesse,

These are the folk working on the simple geospatial operations:
buffer... They came to the list with a finished buffer operation using a
dialog view and we (pramsey, others, me) starting commenting based on
the issues we had run across doing this work earlier. Now they have been
thinking about the bigger picture, doing what looks like great work and
are showing their most recent effort. 

very cool.


--adrian


> 
> Quoting Victor Mauricio Pazos <mauricio.pazos@xxxxxxxx>:
> 
> > Hi Adrian, we are planning Spatial Operation and Editing Tools project and we
> > have taken into consideration your suggestion.
> > 
> > We have planned to refactor buffer UI in 0.1.0-rc1 Iteration.
> > http://udig.refractions.net/confluence/pages/viewpage.action?pageId=9643
> > Is it more adjusted to your idea? Do you want suggest anymore?
> > 
> > Additionally, we agree about the tools and operation definition problems, I
> > can not find definitions but I think, the distinction between tools and
> > operations could be important to take some implementation decisions and to
> > establish a user language in uDig. Then, we propose initial definitions and
> > classify the project requirements taking into account  some Paul e-mails
> > (union merge sujects).
> > 
> > http://udig.refractions.net/confluence/display/COM/Spatial+Operations+and
> +Editing+Tools
> > 
> > Nowadays, we are working in 0.1.0-m3 - Intersect, Clip, Trim, Split.
> > http://udig.refractions.net/confluence/pages/viewpage.action?pageId=9560
> > Comments?
> > 
> > Thanks a lots
> > 
> > Best regards
> > 
> > --
> > Mauricio Pazos
> > www.axios.es
> > 
> > On Wednesday 06 December 2006 13:32, Victor Mauricio Pazos wrote:
> > > Thanks for your suggestion Adrian.
> > >
> > > Regards
> > >
> > > On Wednesday 06 December 2006 11:19, Adrian Custer wrote:
> > > > Hey all,
> > > >
> > > > These are my responses to the Axios team, and the the work I imagine
> > > > will be required to have uDig support geospatial operations.
> > > >
> > > > My ultimate suggestion is: let's implement a really good buffering
> > > > operation, solving all the issues related to workflow, user interface,
> > > > and file creation with just that operation. Adding more operations
> > > > afterwards will be fast and easy.
> > > >
> > > > --adrian
> > > >
> > > > On Tue, 2006-12-05 at 20:00 +0100, Victor Mauricio Pazos wrote:
> > > > > Hi list!, we have begun a project to develop Spatial Operations and
> > > > > Editing Tools features. This new features will be LGPL products.
> > > > >
> > > > > Our first goal are Spatial Operation (buffer and merge). The following
> > > > > link has the project details.
> > > > >
> > > > >  http://udig.refractions.net/confluence/display/COM/Axios
> > > > >
> > > > > We expect yours comments.
> > > > >
> > > > > Thanks in advance
> > > >
> > > > Great to hear you are getting into this issue.
> > > >
> > > > First, this is hard in many ways most especially the user interface.
> > > > There are many solutions and we may have to poke around a little.
> > > >
> > > > Second, because this is the first attempt at an operation interface,
> > > > difficult workflow and GUI issues have to be resolved.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On workflow:
> > > > -----------
> > > > In [[http://www.axios.es/projects/udig/html/]] you show a particular
> > > > workflow for buffering operations
> > > >
> > > >   Select  ->  Invoke Buffer  -> Configure Output -> Configure parameters
> > > >
> > > > Two issues arise with this. First, new users don't know this is the
> > > > workflow before starting their operation so they don't know they have to
> > > > start by selecting. Your strategy provides no way to recover from
> > > >
> > > >   Invoke Buffering
> > > >
> > > > When developing the Gnumeric spreadsheet's graphing interface, we faced
> > > > a similar problem, having to develop a way for users to select after
> > > > calling the graphing wizard. For Gnumeric, this involves entering a
> > > > weird state where you can select and do nothing else. This workflow is
> > > >
> > > >   Invoke Buffering -> Select
> > > >
> > > > uDig must support this strategy.
> > > >
> > > >
> > > > The rest of the workflow should also be consistent; I believe it should
> > > > be organized as:
> > > >
> > > >   Inputs  -> Operation parameters -> Outputs
> > > >
> > > > which would reverse the order of your wizard.
> > > >
> > > >
> > > > So ideally, we have a workflow that goes
> > > >
> > > >   |Invoke Buffer|
> > > >   |-------------| -> Configure parameters -> Configure Output -> run
> > > >   |  Selection  |
> > > >
> > > > in which, when the user invokes the buffering operation, uDig opens a UI
> > > > to the 'Inputs' page which shows the user the features/layers/attributes
> > > > on which the operation will proceed. If a user (for example an advanced
> > > > user) has pre-selected data, then the various inputs fields are filled
> > > > out with that information. If they are empty or if the user wants to
> > > > change the inputs, that is possible.
> > > >
	<mailto:udig-devel-request@xxxxxxxxxxxxxxxxxxxxx?subject=subscribe>
X-List-Received-Date: Thu, 25 Jan 2007 20:29:48 -0000

This is an attempt to create a new layer and add features to it. The layer
shows up fine but there are some problems. The first is that the coord
system is not set. The workaround for now is to set that at runtime by right
clicking on the layer. The second problem is that the layer seems to have no
data within it to plot. The bounds are (0,0)->(-1,-1) and has a feature
count of 0. (Again, determined at runtime by looking at the layer). The
FeatureType here has a Point type for it's "the_geom" with a long and lat,
and a String for "NAME".


		
		IMap map = ApplicationGIS.getActiveMap();
		IGeoResource resource = null;
		try
		{
			Feature f = createLocationFeature(CMH, "cmh1");
			resource =
CatalogPlugin.getDefault().getLocalCatalog().createTemporaryResource(f.getFe
atureType());
			MemoryDataStore mds;
			try
			{
				mds =
resource.resolve(MemoryDataStore.class, null);
				mds.addFeature(f);
			}
			catch (Exception e)
			{
				e.printStackTrace();
			}

		} 
		catch (FactoryRegistryException e1)
		{
			e1.printStackTrace();
		}
		catch (IllegalArgumentException e1)
		{
			e1.printStackTrace();
		}
		
		ApplicationGIS.addLayersToMap(map,
Collections.singletonList(resource), 0);	
	}




The FeatureType was created using the following, some of which was
deprecated but I'm not sure of the current way to go about it.

GeometryAttributeType geometryAttribute =
	
(GeometryAttributeType)AttributeTypeFactory.newAttributeType("the_geom",
Point.class);
	    
	    AttributeType nameAttribute = 
	      AttributeTypeFactory.newAttributeType("NAME", String.class,
true, 48, null);
	    
	    FeatureTypeFactory factory =
FeatureTypeFactory.newInstance("House");  
	    factory.addType(geometryAttribute);
	    factory.addType(nameAttribute);
	    factory.setName("City");  
	    try
	    {
	    	factory.setNamespace(new URI(""));  	
	    }
	    catch(URISyntaxException e)
	    {
	    	e.printStackTrace();
	    }
	    
	    DefaultFeatureType ft = null;
	    try {
	      ft = (DefaultFeatureType) factory.getFeatureType(); 
	    } 
	    catch (SchemaException e) 
	    {
	      e.printStackTrace();
	    }
	        
	    return ft;



The Feature was created by:

class LocationFeature extends DefaultFeature 
{
		    public LocationFeature(Object[] attributes, String
featureId) throws IllegalAttributeException 
		    {
		      super(createLocationFeatureType(),attributes,
featureId);
		    }
}
		
GeometryFactory gf = new GeometryFactory();
Point loc = gf.createPoint(new Coordinate(location.longitude,
location.latitude));
System.out.println("Creating point:" + loc);
   
Object[] featureAttributes = { loc, location.name };
Feature f = null;
f = new LocationFeature(featureAttributes, id);



Back to the top