Do you mean you have N polygons, and you wanna export N shapefiles..?
What for, sir?
You'd better _MAPEXPORT all to a single shapefile, then automatically split in N parts, e.g. thru Qgis.
Yes, that's correct. We have another program that imports the shp files into a database, and cannot import more than one at a time. At the most, we'd have approximately 100 separate shp files. I don't want to run mapexport 100 times, then import 100 times.
Thanks-
Hi,
>> We have another program that imports the shp files into a database, [...]
>> [...] I don't want to run mapexport 100 times, then import 100 times
If you want to get 100 SHP-files you will have to start the import then 100 times ...
What mystic software can only use SHP-files with just one polygon in it?
What database-server (and structure) do you fill with that software, maybe we find a way to fill all polygons in one step.
- alfred -
Like Alfred, I cannot believe your software does accept only one polygon at once.
Instead I guess it will process ONE SHAPEFILE at once, containing N polygons.
Anyway, you can export everything to a SINGLE shape, then split it in 100 sub-shapes by means of the free Qgis.
You should also _MAPEXPORT the Ehandle OD attribute, to allow Qgis catching the 100 unique values, and automatically create the 100 small shapes.
We use an agricultural software package called Real-Time Ag that tracks the nutrient requirements of zones in fields. It will not import files that contain more than one shape. Also, when we import more than one shp file at a time, it connects the poly's together, making it impossible to edit the individual zones in each field, not to mention the separate fields. Each zone in each field has its own nutrient requirements and soil qualities. I'm looking for a way to import these fields and zones more efficiently. Right now the mapping portion of the project is the weak link.
Thanks-
You could try it with lisp, set a counter as the export name then for each entity in a selection set mapexport name from the counter. How well do you know lisp programing or willing to pay someone for it?
Hi Dave,
you can do that with Map. When exporting to SHP you can create multiple SHP files in one go.
1) _mapexport - choose "SHP Multiclass" as filetype and the select a folder for export
2) in second tab ("Feature class" or similar - I do not have the english version and translate from german) choose the second option
3) the drop down list becomes availabe - there you can choose based on which property the polygons are going to be separated
I suppose you cannot use "Layer" - or is each polygon on a separate layer?
You can use MapImport to put each polygon on a separate layer:
- export all polygons to SHP file (single SHP file) - select export option to add ID column (AdMapKey)
- import the shape file - in import dialog you can choose an attribute to separate features - choose AdMapKey
--> each polygon will end up on a separate layer
- do export as described above.
By the way - I tried to separate the features based on object data (ID field) but it didn't work. That only leaves the way described above.
Good luck,
Rob
Screenshots attached:
here is a simple lisp routine to export one a time
(defun c:SingleShape ( / i ss path name) (setq ss (ssget)i 0 path "c:\\temp\\") (while (setq ent(ssname ss i)) (if (findfile(setq name(strcat path (cdr(assoc 5(entget ent)))".shp"))) (command "mapexport" "shp" name "O" "N" "S" "Polygon""M" (ssadd ent) "" "*" "*" "N" "O" "N" "Y" "P") (command "mapexport" "shp" name "N" "S" "Polygon""M" (ssadd ent) "" "*" "*" "N" "O" "N" "Y" "P") ) (setq i (1+ i)) ) )
Below are the options for MAPEXPORT in the command line
"mapexport" ;; command
"shp" ;; export type
name ;;export file name
"O" ;; if exists -> overwrite
"N" ;; Profile
"S" ;; Select option
"Polygon" ;; Type of shape
"M" ;; Manual selection
(ssadd ent) ;; selction set
"" ;; confirm selection set
"*" ;; Layer filter
"*" ;;Class filter
"N" ;;Topology
"O" ;;Options
"N" ;;Coord conversion
"Y" ;;Polylines as polygones
"P" ;;Proceed
MetroVancouverDrafting wrote:
Dont forget to set FILEDIA to 0 before you do it
Moreover, sounds like you should store all your shapefiles in the C:\TEMP folder, isn't it?