Using the hibernate_sequence seems like a good idea in most cases, but for Orgunits it's really crucial to populate the parentid field (which of course would also have to change to bigint for this to make any sense).
So while I agree that the original alphanumeric/string LVLID would fit well in the Code field, I need to be able to populate the hierarchy for the whole world from the database. I could conceivably come up with a script in FME to generate sequential IDs, but that seems quite complicated, and would also not use hibernate_sequence (possibly I just don't know enough about how to use that). I use FME mainly because I have not found a good alternative for simplifying polygons without causing cracks between them. It would in some ways be nice to be able to do everything in PostGIS which has functions like ST_AsGeoJSON and Simplify, but as you can see from the below link, the results are not quite satisfying: http://bostongis.org/PrinterFriendly.aspx?content_name=postgis_simplify mapshaper.org seem to have some of the same problems, which have been avoided by Bjørn Sandvik when he made these world datasets: http://thematicmapping.org/downloads/world_borders.php. The tool he used for simplfying is ArcToolbox Simplify Polygon tool (see page 19 of this master thesis: http://thematicmapping.org/downloads/Thematic_Mapping_Engine.pdf). Unfortunately, FME and ArcToolbox are not integratable to DHIS2. While on this topic, I do think we perhaps need to add a LEVEL field to the ORGANISATIONUNIT table. That would make it quite corresponding to a PostGIS table (separatable on the LEVEL field in order to generate layers for Provinces, Districts etc). This is sort of available in the generated ORGUNITSTRUCTURE table, but that a) needs to be generated and b) seems a bit inefficient to have to join to another big table just to get the level. And perhaps we might want to have a separate table in DHIS2 with the full precision technologies and a link to the orgunit table. Knut On Fri, May 21, 2010 at 10:28 AM, Jason Pickering <[email protected]> wrote: > I do not really have a problem with this, but shouldn't this > information go in the "code" field? Or is it a problem with the number > of orgunits? It would seem unlikely that we would ever have more than > 2,147,483,647 orgunits. > > Are you inserting the ID as the organisationunitid? This seems this > might cause problems with possible clashes with the hibernate_sequence > which is used to generate IDs? > > I have run into this issue only once, but since then, I always use the > hibernate_sequence to generate IDs when I directly insert data into > the DB. > > Regards, > Jason > > > On 5/20/10, Knut Staring <[email protected]> wrote: >> Hello, >> >> In the process of converting WHO identifiers for administrative >> boundaries (LVLID) to ids usable for DHIS2, I've run into the limits >> of the integer datatype we use in DHIS2. >> >> The LVLID is a three letter ISO code followed by 18 digits. We are >> converting the alphabetical ISO for the country to an ISO numeric code >> (preceeded by 1 to make it numeric). >> >> Would it be problematic to change the datatype for organisationunitid >> from integer to bigint? >> >> Knut >> >> _______________________________________________ >> Mailing list: https://launchpad.net/~dhis2-devs >> Post to : [email protected] >> Unsubscribe : https://launchpad.net/~dhis2-devs >> More help : https://help.launchpad.net/ListHelp >> > > > -- > -- > Jason P. Pickering > email: [email protected] > tel:+260968395190 > -- Cheers, Knut Staring _______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : [email protected] Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp

