I use Postgis & sdi 2.3.2. I'm very new with sdi
I want to use dissolve polygon operation in a job.
For testing, I've created a simple job which :
- take postgis data (multipolygon) : sPostGis_Input
- filter postgis dataset : tMap with conditions and same field as in sPostGis_Input component (with same geom column, type object)
- dissolve geometry for reselect dataset : sDissolver (with same geom column, type object)
- Output result in a new postgis table : sPostGis_Output (with same geom column, type Multipolygon)
This job works without errors, I obtain a new postgis table with datas but dissolve seams... no perform dissolve (sorry for my bad english) : in the result table, I obtain the same number of polygon that in the source, with common boudaries not dissolved.
The column used to aggregate features of sDissolver component contains the same value for all features (an identical departement ID)
There is something wrong in my job but I can't find what. Could you help me ?
Hello Jerome, Looks stange
Why do you have a tMap in that job ? Check that you selected the ID column in the sDissolver component ...
For test, you could try the following:
* in tMap, add a column in the output
* set no value for that new column
* in sDissolver, select that new column
* run the job, should output only one row (dissolve all geoms in one).
Thanks for your answer.
I want to describe my needed (it's not very easy) :
- I have, in postgis, a table that contains administratives boudaries (COMMUNES) with 4 fields :
-> id_commune = pk
-> code_insee_commune = simple attribute
-> code_insee_departement = foreign key (table departements - 1,n - table communes)
-> the_geom_dgi = geometry columns, mutlipolygon
- I want to dissolve all communes from departement number "31" :
-> I've placed, in my job, a sPostis_input component with this schema
. id_commune (int) ; code_insee_commune (char(5)) ; code_insee_departement (char(2)) ; the_geom_dgi (object)
. the geometry field choose in basic settings for this component is "the_geom_dgi"
-> to filter datas with code_insee_departement, I've place a tMap compo (i've also tried a tFilterRow compo)
. in source area, I've choosed the 4 fields from the sPostis_input
. in destination area, I've created the same 4 fields + 1 field "the_geom" (object)
. I've linked the first 4 fields
. in destination area, I've wrote a condition : (mysourcerow.code_insee_departement == "31")
-> I've placed a sDissolver compo with code_insee_departement for column used to aggregate features (the schema is the same schema as described in tMap)
-> finally, I've used a sPostgisoutput compo to create the new postgis table, the field "the_geom" (mutlipolygon) is used to store geometry aggregated with sDissolver
I've certainly did wrongs things, may be the used of tMap is an error, but how can I filter data with condition before the dissolve operation (I've tried tFilterRow with same result) ?
This job is only a part of a big job that import csv file with a list of administrative boudaries and, with date conditions, aggregates this boudaries in one or more polygons.
Many Thanks, I hope my english is a little readable (I read better than I wrote :- )
Hi, do you have any error message ? If you turn on "statistics" or "trace" when you run the job do you have any info on the number of geom before/after tmap and other components ?
mysourcerow.code_insee_departement == "31"
mysourcerow.code_insee_departement.equals("31") I guess.