I don't think selecting features with null geometry should be a problem. As you say, this can only be done in the Attribute View, not spatially - but the behaviour of the selected feature should be pretty straightforward. It's in the selection set, but just isn't displayed.
Another issue will be plugins - they should all be written to check for null geometry if they are using it, and take appropriate action (which will depend on the plugin). One way to find the problem areas is to create some null geometry and then work with it in JUMP, watching for exceptions. Sunburned Surveyor wrote: > Well, maybe we need to put together a list of places where OpenJUMP > might choke on a null geometry, and then we can test a fix. > > Here is a start: > > 1) When the feature is about to be rendered. > 2) When the user attempts to select the feature on the screen from the > attribute table. > 3) When the user attempts to flash the feature on the screen from the > attribute table. > > Can we think of any others? > > I'm a little nervous about how we handle the concept of "selecting" > features with no geometry. We will only be able to do this through the > attribute table or through attribute queries, and not on the screen. > Is that going to dork anything up? > > I can work on this fix to support null geometries over the next few > weeks if it is something the group decides to move forward with. I am > going to copy Stefan on this e-mail so he can comment if he wants to. > > SS > > > On Thu, Jan 28, 2010 at 8:43 AM, Martin Davis <mbda...@refractions.net> wrote: > >> I think in the past I"ve used the convention that null geometry is >> represented as GEOMETRYCOLLECTION EMPTY. That way most or all of the >> JUMP functions should still work, but the user doesn't have to try and >> distinguish between a real geometry and one which is just a placeholder >> for null. >> >> Ideally JUMP would be able to handle null geometries in the GEOMETRY >> column as well - this should be fairly easy to add in, since it mostly >> just means checking and returning before doing anything. >> >> Rahkonen Jukka wrote: >> >>> Hi, >>> >>> It would be a correct behaviour to get nulls instead of zeros, I hope you >>> can fix it. But check what happens if some attribute in a table or in the >>> result set of a query contains only NULLs. The attribute field should >>> still appear to OpenJUMP layer schema, and it should be of a correct data >>> type. >>> >>> More fundamental question is what to do if geometry field is NULL. It is >>> not so uncommon situation with databases, and the aim of many GIS projects >>> is just to add spatial data for existing objects with already known >>> attribute data by locating them on map. >>> >>> At present if the result of a PostGIS query contains only NULL geometries >>> OpenJUMP throws a Null Pointer Exception. If there are both real geometries >>> and NULL geometries in the result se, the lines which are missing geometry >>> are skipped. >>> >>> A DB Query Plugin by Larry Reeder is using a workaroud that has been very >>> usable for me: if geometry is missing the plugin creates a default geometry >>> as a little rectangle polygon at the origo. By that way user gets the >>> schema and attributes to OpenJUMP even if the geometry is empty. What is >>> missing is a clever tool for digitizing the real geometry and inserting it >>> in place of the default geometry. >>> >>> So what do developers think about what to do with features which do not >>> have geometry? I am remembering that JUMP itself does not necessarily need >>> geometry and I am rather sure that I have even seen such things in >>> OpenJUMP. I quess I got them to OpenJUMP through opening some shapefile. >>> >>> -Jukka Rahkonen- >>> >>> >>> >>> Michaël Michaud wrote: >>> >>> >>> >>>> Hi, >>>> >>>> I've got a question for database experts. >>>> In DatabaseQueryPlugIn, the following JDBC methods are used to get >>>> numeric attributes from database features >>>> - ResultSet.getInt() >>>> - ResultSet.getDouble() >>>> those methods return an int and a double, even if the >>>> database contains >>>> NULL >>>> NULL : getInt() --> 0 >>>> NULL : getDouble() --> 0.0 >>>> I think that OpenJUMP should get a null value each time the database >>>> contains a NULL value. >>>> >>>> If this there is no special reason to use those methods, I'll >>>> change the >>>> code to get null instead of 0 in this special cases. >>>> >>>> Thanks for any suggestion >>>> >>>> Michaël >>>> >>>> NB : I noticed another problem with null handling in >>>> SimpleQueryPlugIn. >>>> I fixed it in the svn that way : >>>> select features from layer1 where name = (empty combo box) >>>> now returns >>>> empty strings AND nulls (empty strings and null are very similar from >>>> the end-user point of view) >>>> I added "is null" as a function to be able to differentiate null from >>>> empty string cases >>>> There maybe some corner cases which are still not perfectly handled >>>> (when there are null in the dataset and the operator is not >>>> "equal" for >>>> example) >>>> >>>> -------------------------------------------------------------- >>>> ---------------- >>>> The Planet: dedicated and managed hosting, cloud storage, colocation >>>> Stay online with enterprise data centers and the best network >>>> in the business >>>> Choose flexible plans and management services without >>>> long-term contracts >>>> Personal 24x7 support from experience hosting pros just a >>>> phone call away. >>>> http://p.sf.net/sfu/theplanet-com >>>> _______________________________________________ >>>> Jump-pilot-devel mailing list >>>> Jump-pilot-devel@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >>>> >>>> >>>> >>> ------------------------------------------------------------------------------ >>> The Planet: dedicated and managed hosting, cloud storage, colocation >>> Stay online with enterprise data centers and the best network in the >>> business >>> Choose flexible plans and management services without long-term contracts >>> Personal 24x7 support from experience hosting pros just a phone call away. >>> http://p.sf.net/sfu/theplanet-com >>> _______________________________________________ >>> Jump-pilot-devel mailing list >>> Jump-pilot-devel@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >>> >>> >>> >> -- >> Martin Davis >> Senior Technical Architect >> Refractions Research, Inc. >> (250) 383-3022 >> >> >> ------------------------------------------------------------------------------ >> The Planet: dedicated and managed hosting, cloud storage, colocation >> Stay online with enterprise data centers and the best network in the business >> Choose flexible plans and management services without long-term contracts >> Personal 24x7 support from experience hosting pros just a phone call away. >> http://p.sf.net/sfu/theplanet-com >> _______________________________________________ >> Jump-pilot-devel mailing list >> Jump-pilot-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >> >> > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > -- Martin Davis Senior Technical Architect Refractions Research, Inc. (250) 383-3022 ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel