So I want to convert KML files to SHP shapefiles to load it onto PostGIS. Currently I'm using ogr2ogr to do the conversion for me, but it wipes out all the attribute data. How do i preserve this attribute data in the resulting shapefile? Any better feature out there?
Why don't you directly convert a KML file to PostGIS. You can do this using the following command:
This will create a table named layer_0(if not already there) with all your attributes.