Neither of those approaches will work with Shapefiles. The shapefile format
is a very old (and almost obsolete) format so it can only load a single dbf
file that has exactly the same basename as the .shp file. It will also only
manage to contain a set of simple features (that have the same geometry
type) so you can't use the complex feature types to write one as you found
out.
The only way to make what you are trying work in QGIS is to use the table
join functionality to add dbf files that share a common identifier column
to the shapefile.
Alternatives that you could consider (I don't know enough about your
problem to be certain) are geopackage and spatialite databases or a proper
spatial database like PostGIS. All three are supported by GeoTools.
Ian
On 28 February 2017 at 15:09, Paresh Patel <patel.par...@live.com> wrote:
> Hello,
> I have a requirement of generating multiple dbf files for a single
> shape file, and a metadata file too.
> I was looking towards using complex type, but was not able to find writer
> for that. I have ended up generating SimpleFeatureType for generating shape
> file, then DBaseFileWriter to write dbf file. But then I am not able to
> view the extra dbf file data in qGIS (although the file has data).
> How do I associate these two dbf files? Or should I use complexType?
> There is a one to may relationship between a record in parent geometry and
> other dbf file record.
>
> Thanks and regards,
> Paresh..
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> GeoTools-GT2-Users mailing list
> GeoTools-GT2-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
--
Ian Turton
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users