Your question has two halves. The first is what prefixes the "route-type=local" will match. The second half is whether the next-hop can be set when the route-map is attached to a neighbor, versus a redistribution.
The first half is easy. The concept of a "local" route is a BGP concept, not an OSPF concept. So if you apply a route-map to a BGP neighbor that filters for local routes, it will match any prefixes that the local router is sourcing (by originating them with a
network statement or
redistribute statement) and not match any prefixes that were learned from some other BGP neighbor. Therfore, if you apply a route-map to a
redistribute statement that brings OSPF into BGP, it will match nothing, since there is no such thing as an OSPF route where the type = local.
Regarding the second half, you got me very curious, so I grabbed a few routers and built this in the lab for myself. What I found is the following:
It is possible to use a route-map to set the next-hop IP address of a prefix by either attaching the route-map to a neighbor, or to a redistribution. When attached to the
neighbor statement, the neighbor alone sees the next-hop (and he will subsequently advertise that downstream, if configured to do so). When attached to the
redistribute statement, the local router will put the new next-hop into his own BGP table, and subsequently share that with neighbors, if configured to do so. (Take care that the next-hop is actually a reachable IP, since the router may not install the prefix if the next-hop is not reachable.)
As we can see, applying a route-map to a redistribute command is able to do more than just filter prefixes, but also affect the next-hop (for certain protocols). Here is a doc that shows you what
match statements and
set statements are supported in which protocols.